Method ToRemotePath
- Namespace
- MailFathom.Domain.Folders
- Assembly
- MailFathom.Domain.dll
ToRemotePath(MailFolderAlias, RemoteFolderPath, MailFolderParticipation?, bool, MailFolderSpecialUse?)
Maps an alias onto the server-advertised path an operator wrote.
public static MailFolderMapping ToRemotePath(MailFolderAlias alias, RemoteFolderPath remotePath, MailFolderParticipation? participation = null, bool mayCreateMissingFolder = false, MailFolderSpecialUse? specialUse = null)
Parameters
aliasMailFolderAliasThe operator-facing folder name.
remotePathRemoteFolderPathThe remote path the alias names.
participationMailFolderParticipationHow far the folder is admitted, or null for a folder that takes part in everything.
mayCreateMissingFolderboolWhether the folder may be created when the server advertises none at that path.
specialUseMailFolderSpecialUse?The role the folder plays, or null for a folder configuration labels with none.
Returns
- MailFolderMapping
A mapping resolved by matching the advertised path.
Remarks
The role is a label here rather than the way the folder is found, which is why it may be given to a folder whose server advertises no attribute for it at all. Discovery still matches the configured path, so labelling a folder never changes which remote folder the alias binds to.
Exceptions
- ArgumentOutOfRangeException
Thrown when
specialUseis not a defined role.