Table of Contents

Class MailboxDestinationResolver

Namespace
MailFathom.Application.Mail.Mutations.Destinations
Assembly
MailFathom.Application.dll

Turns what an author named as a mutation's destination into the folder the command will be issued against.

public sealed class MailboxDestinationResolver
Inheritance
MailboxDestinationResolver
Inherited Members

Remarks

This is the single place a destination becomes a remote folder, so every author of a relocation or a copy reaches the same folder by the same name and meets the same refusal. A rule is one such author and has no resolution of its own.

The two kinds of destination are answered differently, and the difference is the whole of what this type adds. A folder the account mirrors already has a binding, because the run that synchronizes it resolved the alias before it read anything, so asking the server again would repoint a binding a checkpoint hangs off. A folder the account only maps is never scheduled by a run, so nothing would ever bind it: it is resolved here, on demand, through the same resolver, the same binding record, and the same mapping-change audit a mirrored folder uses. A server that has since renamed the folder is followed exactly as it is for a mirrored folder — the binding is replaced by the next generation, with no checkpoint to invalidate, because a folder nothing mirrors has none.

Every answer is remembered for the life of this instance, which is one account run. A batch of two hundred emails matching one filing rule therefore costs one listing rather than two hundred, and the folder a pass began with is the folder it finishes with.

Constructors

MailboxDestinationResolver(MailFolderReferenceResolver, IMailFolderResolutionStore, MailFolderResolver, IMailTransportSecurityPolicyReader)

Initializes the resolver from the two ways a destination is turned into a folder.

Methods

ResolveAsync(MailAccountId, IEnumerable<MailFolderReference>, CancellationToken)

Resolves every destination one batch of authored changes names.