Method ReadAsync
- Namespace
- MailFathom.Application.Folders
- Assembly
- MailFathom.Application.dll
ReadAsync(CancellationToken)
Reads the user's mailboxes and every folder a screen may draw beneath them.
public Task<MailFolderDirectory> ReadAsync(CancellationToken cancellationToken)
Parameters
cancellationTokenCancellationTokenPropagates caller cancellation.
Returns
- Task<MailFolderDirectory>
One entry per account the caller's user is assigned, each with its folders, and whether the deployment refreshes them.
Remarks
The grant and the user bound are the composed reading's, taken before anything here runs, so a user assigned no account reads an empty tree and a caller without the permission is refused — the same two answers the mailbox list gives, because naming a user's folders is the same disclosure as naming their mailboxes.
Exceptions
- PrincipalNotAuthorizedException
Thrown when the use case was reached by anything but a caller granted MailRead that is acting for a user.
- OperationCanceledException
Thrown when the caller cancels.