Method ReadAsync
- Namespace
- MailFathom.Application.Contacts.Correspondence
- Assembly
- MailFathom.Application.dll
ReadAsync(Contact, CancellationToken)
Reads what the caller's own mail holds about one contact.
public Task<ContactCorrespondence> ReadAsync(Contact contact, CancellationToken cancellationToken)
Parameters
contactContactThe contact, as the caller's own book answered it.
cancellationTokenCancellationTokenPropagates caller cancellation.
Returns
- Task<ContactCorrespondence>
The conversations and the documents, each bounded and newest first.
Remarks
Nothing here writes, and the operation is therefore safe to repeat. The grant is the mail one rather than the contact one, because what this publishes is mail: reading the contact itself is the caller's own book's decision and was taken before this was reached.
Exceptions
- ArgumentNullException
Thrown when
contactis null.- PrincipalNotAuthorizedException
Thrown when the use case was reached by anything but a caller granted MailRead.
- SensitiveContentScannerUnavailableException
Thrown when a switched-on scanner could not establish what the answer carries, which refuses the answer rather than serving it unscanned.