Method ReadAsync
- Namespace
- MailFathom.Application.Folders
- Assembly
- MailFathom.Application.dll
ReadAsync(MailboxScope, CancellationToken)
Reads one entry per folder of the scope that local state holds a binding for.
Task<IReadOnlyList<StoredMailFolder>> ReadAsync(MailboxScope scope, CancellationToken cancellationToken)
Parameters
scopeMailboxScopeThe accounts and folders to report on.
cancellationTokenCancellationTokenPropagates caller cancellation.
Returns
- Task<IReadOnlyList<StoredMailFolder>>
One entry per such folder, ordered ordinally by account and then by alias.
Remarks
A folder the scope names but nothing has ever bound to a remote folder appears in no entry, because there is no remote folder to report and no mail to count. A caller composes the folder list from what it already knows the scope holds and reads an absence here as exactly that.
Exceptions
- ArgumentNullException
Thrown when
scopeis null.- OperationCanceledException
Thrown when the caller cancels.