Table of Contents

Class ConfigurationEdit

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

One change a configuration write applies: a setting given a value, or a setting the document stops carrying.

public sealed record ConfigurationEdit : IEquatable<ConfigurationEdit>
Inheritance
ConfigurationEdit
Implements
Inherited Members

Remarks

The change is stated in an ordinary colon-delimited configuration key and an ordinary configuration value, which is the whole of the vocabulary. A persisted setting is the same key the file beneath it would have written, so an edit that spoke a second language — a JSON pointer, a document fragment, a merge directive — would give the deployment two ways to name one setting and nothing able to say which of them a later reader meant.

An index is a path segment like any other: Rules:1:Name reaches the second declared rule, because the persisted document writes an array element as an object keyed by its own index. Nothing here interprets the segment; the store that holds the document decides how a segment becomes a property, and the binder decides whether Rules:second:Name was a position at all.

Removal is a change of its own rather than a value of null because the persisted layer is sparse: a setting the document does not carry is inherited from the source beneath it, while a setting carrying no value shadows that source with nothing. Only the first of those undoes a persisted setting, so only the first is what an operator asking to stop persisting one means.

Fields

MaximumPathLength

How long a configuration path may be.

MaximumValueLength

How long a configuration value may be.

Properties

Path

Gets the colon-delimited configuration path the change reaches.

RemovesTheSetting

Gets whether the change stops the document carrying the setting, leaving it inherited from below.

Value

Gets the value the setting takes, or null when the change removes the setting.

Methods

Removing(string)

States that the document stops carrying a setting, so the source beneath the layer supplies it again.

SetTo(string, string)

States that a setting takes a value.

ToString()

Returns a string that represents the current object.