Table of Contents

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

accountId MailAccountId

The account the changes are authored for.

destinations IEnumerable<MailFolderReference>

What the authors named, in any order and with repetitions.

cancellationToken CancellationToken

Cancels 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 destinations is null.

PersistenceConcurrencyConflictException

Thrown when a competing writer recorded a binding for the same alias first.