Method ReadAsync
- Namespace
- MailFathom.Application.Folders
- Assembly
- MailFathom.Application.dll
ReadAsync(MailFolderSelection, CancellationToken)
Reads the folders of every served account that take part in one thing.
Task<IReadOnlyList<MailFolderIdentity>> ReadAsync(MailFolderSelection selection, CancellationToken cancellationToken)
Parameters
selectionMailFolderSelectionWhat the folders take part in.
cancellationTokenCancellationTokenCancels the read.
Returns
- Task<IReadOnlyList<MailFolderIdentity>>
The folders, ordered by account and alias; empty when no served account has one.
Exceptions
- ArgumentOutOfRangeException
Thrown when
selectionis not a defined member.
ReadAsync(MailFolderSelection, IReadOnlyCollection<MailAccountId>, CancellationToken)
Reads the folders of the named accounts that take part in one thing.
Task<IReadOnlyList<MailFolderIdentity>> ReadAsync(MailFolderSelection selection, IReadOnlyCollection<MailAccountId> accounts, CancellationToken cancellationToken)
Parameters
selectionMailFolderSelectionWhat the folders take part in.
accountsIReadOnlyCollection<MailAccountId>The accounts asked about; one this deployment does not serve contributes nothing.
cancellationTokenCancellationTokenCancels the read.
Returns
- Task<IReadOnlyList<MailFolderIdentity>>
The folders, ordered by account and alias.
Remarks
The shape a read acting for one user takes, which narrows by the accounts that user is assigned and has no use for anybody else's folders.
Exceptions
- ArgumentNullException
Thrown when
accountsis null.- ArgumentOutOfRangeException
Thrown when
selectionis not a defined member.