Method ResolveAsync
- Namespace
- MailFathom.Application.Mail.Mutations.Destinations
- Assembly
- MailFathom.Application.dll
ResolveAsync(MailAccountId, IEnumerable<MailFolderReference>, CancellationToken)
Resolves every destination one batch of authored changes names.
public Task<MailboxDestinations> ResolveAsync(MailAccountId accountId, IEnumerable<MailFolderReference> destinations, CancellationToken cancellationToken)
Parameters
accountIdMailAccountIdThe account the changes are authored for.
destinationsIEnumerable<MailFolderReference>What the authors named, in any order and with repetitions.
cancellationTokenCancellationTokenCancels the listing and the write that records a new binding.
Returns
- Task<MailboxDestinations>
One answer per distinct destination named.
Remarks
It must be awaited before the transaction the changes are written in is opened, because resolving a folder the account only maps reaches the mail server and records a binding in a session of its own.
Exceptions
- ArgumentNullException
Thrown when
destinationsis null.- PersistenceConcurrencyConflictException
Thrown when a competing writer recorded a binding for the same alias first.