Table of Contents

Method FindAsync

Namespace
MailFathom.Application.Contacts
Assembly
MailFathom.Application.dll

FindAsync(ContactBookScope, ContactId, CancellationToken)

Reads one contact by the identity the book gave it.

public Task<Contact?> FindAsync(ContactBookScope scope, ContactId contactId, CancellationToken cancellationToken)

Parameters

scope ContactBookScope

The books read.

contactId ContactId

The contact to read.

cancellationToken CancellationToken

Cancels the read.

Returns

Task<Contact>

The contact, or null where the scope shows no such person.

Remarks

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.