Class MailFolderMapping
- Namespace
- MailFathom.Domain.Folders
- Assembly
- MailFathom.Domain.dll
Expresses what an operator says about one folder: where it is, what it is for, and what it takes part in.
public sealed record MailFolderMapping : IEquatable<MailFolderMapping>
- Inheritance
-
MailFolderMapping
- Implements
- Inherited Members
Remarks
A mapping is the whole of what configuration says about a folder. Which remote folder it currently names is discovery's answer, not the operator's, which is why nothing here carries a generation or a resolved path.
Where the folder is and what it is for are separate answers. Target says which of them locates the folder, and SpecialUse says which role the folder plays whichever way it was located — so a folder found by path can still be labelled as this account's junk folder, and a folder found by role is labelled with the role that found it.
Properties
- Alias
Gets the operator-facing folder name.
- MayCreateMissingFolder
Gets whether MailFathom may create the folder on the mail server when the account's server advertises none at the configured path.
- Participation
Gets how far into MailFathom the mapped folder is admitted.
- RemotePath
Gets the configured remote path, which is present exactly when Target is RemotePath.
- SpecialUse
Gets the role the folder plays for its account, and null for a folder configuration gives none.
- Target
Gets which way this mapping names its remote folder.
Methods
- Plays(MailFolderSpecialUse)
Reports whether this folder plays a role, which is how a feature asking for one recognizes it.
- ToRemotePath(MailFolderAlias, RemoteFolderPath, MailFolderParticipation?, bool, MailFolderSpecialUse?)
Maps an alias onto the server-advertised path an operator wrote.
- ToSpecialUse(MailFolderAlias, MailFolderSpecialUse, MailFolderParticipation?)
Maps an alias onto a special-use role, so the server's own naming stays out of configuration.