Class MailFolderResolver
- Namespace
- MailFathom.Application.Folders
- Assembly
- MailFathom.Application.dll
Turns a configured alias into the durable binding synchronization reads under.
public sealed class MailFolderResolver
- Inheritance
-
MailFolderResolver
- Inherited Members
Remarks
Resolution runs before every synchronization run rather than once, because the folder an alias names is the server's answer and the server is free to change it. The run that observes a different remote folder is also the run that starts its new generation, so no work is ever committed under a binding that has not been recorded.
It is also where a folder a mapping asked to have created comes into existence. Placing the creation at resolution rather than at a call site means every path that resolves an alias creates the folder that alias names, without a second trigger to keep in step with this one; the synchronization run is that path, so a mapping no run resolves has nothing created for it. Nothing is created by reading configuration and nothing is created for a mapping nothing ever resolves; after the first creation the server advertises the folder, so a later run matches it and issues no second creation.
Constructors
- MailFolderResolver(IRemoteFolderCatalog, IRemoteFolderCreator, IMailFolderResolutionStore, IMailFolderMappingChangeAuditor, IPersistenceSessionFactory, TimeProvider)
Initializes a new folder resolver.
Methods
- ResolveAsync(MailAccountId, MailFolderMapping, MailTransportSecurityPolicy, CancellationToken)
Resolves one configured alias against the folders its server currently advertises.