Table of Contents

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

scope ContactBookScope

The books read.

address EmailAddress

The address to resolve, in its comparison form.

cancellationToken CancellationToken

Cancels the read.

Returns

Task<Contact>

The contact, or null where nobody in the scope holds it.

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 scope is null.

PrincipalNotAuthorizedException

Thrown when the read was reached by anything but a caller granted AdminAuditRead at a scope covering the scope's user.