Method ReadAsync
- Namespace
- MailFathom.Application.Mail.Delivery.Drafts
- Assembly
- MailFathom.Application.dll
ReadAsync(MailAccountSelector?, CancellationToken)
Reads the drafts the caller's user is writing, newest edit first.
public Task<IReadOnlyList<MailDraftRecord>> ReadAsync(MailAccountSelector? account, CancellationToken cancellationToken)
Parameters
accountMailAccountSelector?The account to narrow to, or null for every account this user is assigned.
cancellationTokenCancellationTokenCancels the read.
Returns
- Task<IReadOnlyList<MailDraftRecord>>
The drafts, at most MaximumCount of them, empty where the user is writing none.
Exceptions
- PrincipalNotAuthorizedException
Thrown when the caller does not hold MailDraftsWrite, or is acting for no user.
- MailAccountNotAccessibleException
Thrown when
accountnames an account the caller's user is not assigned, which includes every account this deployment does not serve.