Method ExportAsync
- Namespace
- MailFathom.Application.Contacts
- Assembly
- MailFathom.Application.dll
ExportAsync(ContactBookScope, ContactId, CancellationToken)
Produces everything the books hold about one person.
public Task<ContactExport?> ExportAsync(ContactBookScope scope, ContactId contactId, CancellationToken cancellationToken)
Parameters
scopeContactBookScopeThe books read.
contactIdContactIdThe contact to export.
cancellationTokenCancellationTokenCancels the read.
Returns
- Task<ContactExport>
The export, or null when the scope shows no such contact.
Remarks
It is what a data-subject access request is answered from, which is reading what this deployment derived about a person rather than a report of its own state. 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 export was reached by anything but a caller granted AdminAuditRead at a scope covering the scope's user.