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
scopeContactBookScopeThe books read.
contactIdContactIdThe contact to read.
cancellationTokenCancellationTokenCancels the read.
Returns
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
scopeis null.- PrincipalNotAuthorizedException
Thrown when the read was reached by anything but a caller granted AdminAuditRead at a scope covering the scope's user.