Interface IMailFolderMappingReader
- Namespace
- MailFathom.Application.Folders
- Assembly
- MailFathom.Application.dll
Answers which folder of an account a name refers to, whether the name is an alias or a role.
public interface IMailFolderMappingReader
Remarks
The decision is configuration's and is read through a port for the reason every other per-account folder decision is: the paths that need it are a rule's destination, a mailbox read's folder filter, and every feature that wants this account's junk folder, and none of them may reach for a settings type of its own. Answering here is what stops each such feature from inventing a configuration key naming a folder a mapping already names.
Both questions are answered over every mapping of the account, whatever the folders take part in. What a folder is
for is a different question from whether MailFathom keeps a copy of it, so a mapping carrying Synchronize:
false answers here exactly as any other does, and a condition asking which role a folder plays gets the same
answer whether or not a run has ever reached it. Filing into such a folder is refused elsewhere — a rule's
destination has to name a folder the account mirrors — and that refusal belongs to the rule rather than to this
answer, which would otherwise be two different answers to one question.
Methods
- FindFolderNamed(MailAccountId, MailFolderAlias)
Gets the folder of an account configuration gave an alias.
- FindFolderPlayingRole(MailAccountId, MailFolderSpecialUse)
Gets the folder of an account that plays a role.