Method FindByAddressAsync
- Namespace
- MailFathom.Application.Contacts
- Assembly
- MailFathom.Application.dll
FindByAddressAsync(ContactBookScope, EmailAddress, CancellationToken)
Reads the person who uses one address.
public Task<Contact?> FindByAddressAsync(ContactBookScope scope, EmailAddress address, CancellationToken cancellationToken)
Parameters
scopeContactBookScopeThe books read.
addressEmailAddressThe address to resolve, in its comparison form.
cancellationTokenCancellationTokenCancels the read.
Returns
Remarks
Resolving an address to a person is the most pointed read the book answers, which is why it asks for the same grant the listing does rather than a weaker one. A collected book whose mail account the caller's scope does not cover is left out of the read, so a contact held only there is answered as absent rather than refused.
Exceptions
- ArgumentNullException
Thrown when
scopeis null.- PrincipalNotAuthorizedException
Thrown when the read was reached by anything but a caller granted AdminAuditRead at a scope covering the scope's user.