Method TryResolve
- Namespace
- MailFathom.Application.Folders
- Assembly
- MailFathom.Application.dll
TryResolve(MailAccountId, MailFolderReference)
Resolves what a caller named without refusing a role the account plays no folder with.
public MailFolderMapping? TryResolve(MailAccountId accountId, MailFolderReference reference)
Parameters
accountIdMailAccountIdThe account the folder belongs to.
referenceMailFolderReferenceThe alias or role the caller named.
Returns
- MailFolderMapping
The mapping, or null when this account has no folder that reference means.
Remarks
It exists for the caller asking several accounts one question — a mailbox read narrowed to the junk folder across every account it serves — where one account without such a folder is an account contributing nothing rather than a request to refuse. A caller asking about a single account uses Resolve(MailAccountId, MailFolderReference) instead, so that a role nothing answers still fails rather than reading as a folder holding no mail.
Exceptions
- ArgumentException
Thrown when
referenceis the unspecified struct default.