Method ReadAsync
- Namespace
- MailFathom.Application.Accounts
- Assembly
- MailFathom.Application.dll
ReadAsync(CancellationToken)
Reads the served accounts and their synchronization freshness.
public Task<MailAccountDirectory> ReadAsync(CancellationToken cancellationToken)
Parameters
cancellationTokenCancellationTokenPropagates caller cancellation.
Returns
- Task<MailAccountDirectory>
The served accounts with their folders, and whether the deployment refreshes them.
Remarks
Nothing here writes, so the operation is safe to repeat, and it sets no remote state because it speaks to no mail server at all.
The grant is asked for before anything is read, and it is asked for here rather than only at the transport that withholds the tool: naming the accounts a deployment serves is publishing that they exist, and an entrypoint added later would otherwise publish them by reaching this use case without passing a filter.
Exceptions
- PrincipalNotAuthorizedException
Thrown when the use case was reached by anything but a caller granted MailRead.