Table of Contents

Method ResolveAsync

Namespace
MailFathom.Application.Folders
Assembly
MailFathom.Application.dll

ResolveAsync(MailAccountId, MailFolderMapping, MailTransportSecurityPolicy, CancellationToken)

Resolves one configured alias against the folders its server currently advertises.

public Task<MailFolderResolutionResult> ResolveAsync(MailAccountId accountId, MailFolderMapping mapping, MailTransportSecurityPolicy transportSecurityPolicy, CancellationToken cancellationToken)

Parameters

accountId MailAccountId

The account owning the alias.

mapping MailFolderMapping

What configuration says the alias names.

transportSecurityPolicy MailTransportSecurityPolicy

The connection and authentication policy discovery must obey.

cancellationToken CancellationToken

Cancels discovery and the write that records a new binding.

Returns

Task<MailFolderResolutionResult>

The durable binding, or the reason the alias resolved to no single advertised folder.

Remarks

A binding that already matches the advertised folder is returned without a write and without an audit record. A binding that names a different remote folder is replaced by the next generation, which starts with no checkpoint, so the new folder is synchronized from its first UID whatever UIDVALIDITY it reports.

Exceptions

ArgumentNullException

Thrown when mapping is null.

PersistenceConcurrencyConflictException

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