Table of Contents

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

value string

The configured remote path, which is trimmed.

Returns

RemoteFolderPath

A validated path.

Exceptions

ArgumentException

Thrown when value is 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

value string

The configured remote path, which is trimmed.

hierarchyDelimiter char?

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 value is blank, contains a control character, or is bounded by hierarchyDelimiter, and when hierarchyDelimiter is whitespace or a control character.