ConfigurationUnsetValueMode Enum
Definition
- Namespace
- Bodu.Text.Configuration
- Assembly
- Bodu.Text.Configuration.dll
- Package
- Bodu.Text.Configuration 1.0.0
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 = 0Treat
unsetas an ordinary literal value. The resolved view contains the string"unset"for the matching key.RemoveEffectiveValue = 1Treat
unsetas 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
| Product | Versions |
|---|---|
| .NET | 8, 10 |