Method ToSpecialUse
- Namespace
- MailFathom.Domain.Folders
- Assembly
- MailFathom.Domain.dll
ToSpecialUse(MailFolderAlias, MailFolderSpecialUse, MailFolderParticipation?)
Maps an alias onto a special-use role, so the server's own naming stays out of configuration.
public static MailFolderMapping ToSpecialUse(MailFolderAlias alias, MailFolderSpecialUse specialUse, MailFolderParticipation? participation = null)
Parameters
aliasMailFolderAliasThe operator-facing folder name.
specialUseMailFolderSpecialUseThe role the remote folder must carry, which the folder then also plays.
participationMailFolderParticipationHow far the folder is admitted, or null for a folder that takes part in everything.
Returns
- MailFolderMapping
A mapping resolved by matching the role.
Remarks
The role locates the folder and labels it, which is what a mapping naming a role has always meant. There is no way to say one role and mean another, because a second role beside this one would be a mapping whose two halves could disagree.
Exceptions
- ArgumentOutOfRangeException
Thrown when
specialUseis not a defined role.