Struct LocalMailFolderName
- Namespace
- MailFathom.Domain.Folders
- Assembly
- MailFathom.Domain.dll
The name of one level of a local folder hierarchy, as a person typed it or a source folder supplied it.
public readonly record struct LocalMailFolderName : IEquatable<LocalMailFolderName>
- Implements
- Inherited Members
Remarks
A name is one level and never a path: the local hierarchy delimiter is fixed, so a name carrying it would be two levels that only look like one. No source path is ever derived from a name either — a local folder reaches a server only through a mapping an operator wrote — so a name carrying some server's own delimiter is harmless here.
Names compare without regard to case through ComparisonKey, which is the form the database's uniqueness among siblings is written over, so the rule and the constraint cannot disagree.
Fields
- HierarchyDelimiter
The delimiter between levels of the local hierarchy, which no name may contain.
- MaximumLength
The longest name accepted, in UTF-16 code units.
Properties
- ComparisonKey
Gets the form two names are compared in.
- Inbox
Gets the name the inbox carries.
- IsReservedAtTopLevel
Gets whether this is the name only the protected inbox may carry at the top of a hierarchy.
- Value
Gets the name, trimmed.
Methods
- Create(string)
Reads a name that is known to be valid.
- NamesSameFolderAs(LocalMailFolderName)
Gets whether two names name the same folder among siblings.
- ToString()
Returns the fully qualified type name of this instance.
- TryCreate(string?, out LocalMailFolderName)
Reads a name, refusing one that is empty, too long, or carries a control character, a format character, or the hierarchy delimiter.