Table of Contents

ConfigurationUnsetValueMode Enum

Definition

Namespace
Bodu.Text.Configuration
Assembly
Bodu.Text.Configuration.dll
Package
Bodu.Text.Configuration 1.0.0
Source
ConfigurationUnsetValueMode.cs

Selects how the resolver treats the literal value unset, which EditorConfig defines as a sentinel that removes the effect of any previously set property for the matching path.

public enum ConfigurationUnsetValueMode
Extension Methods

Fields

TreatAsLiteral = 0

Treat unset as an ordinary literal value. The resolved view contains the string "unset" for the matching key.

RemoveEffectiveValue = 1

Treat unset as a directive that removes the effective value of the property for the matching path. The resolved view omits the key entirely.

Remarks

In EditorConfigCompatible mode the resolver follows the EditorConfig rule and removes the effective value. In Bodu mode the literal is preserved by default so users who wish to store the string unset are not surprised. Set this mode explicitly when you want EditorConfig-style behaviour under the Bodu profile.

// EditorConfig's "unset" sentinel: RemoveEffectiveValue makes a later
// `indent_size = unset` erase the inherited value from the resolved view.
ConfigurationView view = document.Resolve(targetPath, new ConfigurationResolveOptions
{
    UnsetValueMode = ConfigurationUnsetValueMode.RemoveEffectiveValue,
});

Applies to

ProductVersions
.NET8, 10