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
pathstringThe colon-delimited configuration path.
valuestringThe 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
pathis not a configuration key, or when either the path orvaluecarries a NUL character.- ArgumentNullException
Thrown when
valueis null, which is Removing(string) rather than a value.- ArgumentOutOfRangeException
Thrown when
pathis longer than MaximumPathLength, orvaluelonger than MaximumValueLength.