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
accountIdMailAccountIdThe account owning the alias.
mappingMailFolderMappingWhat configuration says the alias names.
transportSecurityPolicyMailTransportSecurityPolicyThe connection and authentication policy discovery must obey.
cancellationTokenCancellationTokenCancels 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
mappingis null.- PersistenceConcurrencyConflictException
Thrown when a competing writer recorded a binding for the same alias first.