Table of Contents

Method SetTo

Namespace
MailFathom.Application.Configuration
Assembly
MailFathom.Application.dll

SetTo(string, string)

States that a setting takes a value.

public static ConfigurationEdit SetTo(string path, string value)

Parameters

path string

The colon-delimited configuration path.

value string

The configuration value, which may be empty because an empty string is a value an operator can mean.

Returns

ConfigurationEdit

The change.

Remarks

A NUL is refused here rather than left to the commit because it is the one character a candidate can carry that composes into valid JSON and can never be stored: PostgreSQL's jsonb holds text, and text in PostgreSQL has no NUL, so the change would compose, validate, and then be refused by the server on every attempt. Answering it at the surface that stated the change names the character; answering it at the commit could only name a state the server gave. Both halves of an edit are refused for it, because a segment becomes a property name and a key is text exactly as a value is.

Exceptions

ArgumentException

Thrown when path is not a configuration key, or when either the path or value carries a NUL character.

ArgumentNullException

Thrown when value is null, which is Removing(string) rather than a value.

ArgumentOutOfRangeException

Thrown when path is longer than MaximumPathLength, or value longer than MaximumValueLength.