Table of Contents

Class MailFolderReferenceResolver

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

Turns what a caller named a folder into the folder of an account it means.

public sealed class MailFolderReferenceResolver
Inheritance
MailFolderReferenceResolver
Inherited Members

Remarks

This is the single place a reference becomes a mapping, and it exists so that naming a folder by role is one behavior rather than one per caller. A rule's destination, a mailbox read's folder filter, and every later feature that lets a folder be named come here, so the refusal a role nothing carries produces is the same refusal whichever of them asked.

The two kinds of name fail differently, and deliberately. A role is a question only configuration answers, so a role no folder of the account plays is refused: there is nothing the caller could have meant. An alias is already the folder's name, so one configuration does not map resolves to no mapping without refusing anything — a mailbox read naming a folder that is not there must answer with no mail rather than confirm which names exist.

Constructors

MailFolderReferenceResolver(IMailFolderMappingReader)

Initializes the resolver.

Methods

Resolve(MailAccountId, MailFolderReference)

Resolves what a caller named into the folder of one account it refers to.

ResolveAlias(MailAccountId, MailFolderReference)

Resolves what a caller named into the alias every later read and write of the folder is expressed in.

TryResolve(MailAccountId, MailFolderReference)

Resolves what a caller named without refusing a role the account plays no folder with.