Method Create
- Namespace
- MailFathom.Domain.Folders
- Assembly
- MailFathom.Domain.dll
Create(string)
Creates a path an operator wrote, whose hierarchy delimiter the server has not reported.
public static RemoteFolderPath Create(string value)
Parameters
valuestringThe configured remote path, which is trimmed.
Returns
- RemoteFolderPath
A validated path.
Exceptions
- ArgumentException
Thrown when
valueis blank or contains a control character.
Create(string, char?)
Creates a path an operator wrote, together with a hierarchy delimiter when one is known.
public static RemoteFolderPath Create(string value, char? hierarchyDelimiter)
Parameters
valuestringThe configured remote path, which is trimmed.
hierarchyDelimiterchar?The hierarchy delimiter, or null when none is known.
Returns
- RemoteFolderPath
A validated path.
Remarks
Surrounding whitespace is removed, because it is padding in a configuration file rather than part of a name. A path the server itself advertised is built through TryCreate(string, char?, out RemoteFolderPath) instead and keeps its text exactly.
Exceptions
- ArgumentException
Thrown when
valueis blank, contains a control character, or is bounded byhierarchyDelimiter, and whenhierarchyDelimiteris whitespace or a control character.