Method NotAUsableIdentifier
- Namespace
- MailFathom.Application.Emails.Mailboxes
- Assembly
- MailFathom.Application.dll
NotAUsableIdentifier(string, Exception)
Refuses text that names no identity this system issues, such as an account identifier or a folder alias.
public static MailboxQueryFilterInvalidException NotAUsableIdentifier(string filterName, Exception cause)
Parameters
filterNamestringHow this assembly names the filter, for example
folder aliases.causeExceptionThe validation failure the domain identity raised, kept as the inner exception.
Returns
- MailboxQueryFilterInvalidException
The failure to raise.
Remarks
A protocol adapter converts a caller's text into the domain identities a query is expressed in, and text that is neither — blank, or carrying a control character — is refused there. It reports the refusal through this failure so an adapter needs no failure of its own: the code is already the one allocated for a filter the query cannot accept, and a second one would mean two codes for one answer. The cause travels as the inner exception, where an operator reads it and no client does.
NotAUsableIdentifier(string)
Refuses text that names no identity this system issues, where no other failure explains why.
public static MailboxQueryFilterInvalidException NotAUsableIdentifier(string filterName)
Parameters
filterNamestringHow this assembly names the filter, for example
folder aliases.
Returns
- MailboxQueryFilterInvalidException
The failure to raise.
Remarks
The overload without a cause exists for the checks an adapter makes itself, before a domain type is asked to read the text: a length or a character class it refuses outright raises no exception of its own to carry.