Class AuthoredMailKeywords
- Namespace
- MailFathom.Domain.Mutations
- Assembly
- MailFathom.Domain.dll
Holds the keywords one authored change names, in the form they will be written to a mail server.
public sealed record AuthoredMailKeywords : IEquatable<AuthoredMailKeywords>
- Inheritance
-
AuthoredMailKeywords
- Implements
- Inherited Members
Remarks
It is a separate type from RemoteEmailKeywords because the two answer opposite questions about the same word. That one reads what a server reported, where an unusable keyword is dropped so that one odd flag cannot stop a reconciliation window recording the rest of a mailbox. This one carries what somebody typed, where dropping is the wrong answer twice over: a rule would silently do less than it says, and the operator would have no way to find out which of their keywords was the problem. So an unusable keyword is refused here, before it is durable and while the configuration key that carries it can still be named.
The written form is kept rather than the comparison form, which is the other half of the difference. Flag names are
case-insensitive in RFC 9051, so folding is the right answer for deciding whether two observations found the same
keyword; it is the wrong answer for a STORE, because the operator's own mail client renders whatever this
puts on their message and $TODO where they wrote $Todo is a surprise this system has no reason to
hand them. Sameness is still decided by the folded form — the set deduplicates, orders, and compares by it — so
nothing about matching changes and only what goes on the wire does.
A keyword is an IMAP atom, and IsWritable(string?) is where that grammar is enforced. The refusal that matters
most is the leading backslash: it is how a system flag is spelled, so refusing it is what keeps \Answered and
\Draft out of a keyword list and therefore refused as this system says they are.
Properties
- IsEmpty
Gets whether the change names no keyword at all.
- None
Gets the keywords of a change that names none, which is what clearing every keyword asks for.
- Values
Gets the keywords as they were written, without duplicates, ordered by their comparison form.
Methods
- Create(IEnumerable<string>)
Builds the keyword set one authored change names.
- Equals(AuthoredMailKeywords?)
Reports whether two authored sets name the same keywords, whichever way each was spelled.
- GetHashCode()
Serves as the default hash function.
- IsWritable(string?)
Reports whether a keyword is one MailFathom may ask a server to store.
- TryCreate(IEnumerable<string>, out AuthoredMailKeywords)
Reads the keyword set one authored change names, without raising over a value somebody mistyped.