Table of Contents

ConfigurationMissingPathRootMode Enum

Definition

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

Selects how Resolve(IniDocumentBase, string?, ConfigurationResolveOptions?) reacts when the document was parsed from a string and no PathRoot was supplied.

public enum ConfigurationMissingPathRootMode
Extension Methods

Fields

UseEmptyRoot = 0

Use an empty path root. Patterns without / match at any depth; patterns with / are anchored to the root of the supplied target path. This is the default for the Bodu profile.

Throw = 1

Throw InvalidOperationException when no path root has been supplied. This is the default for the EditorConfigCompatible profile.

Remarks

Strict EditorConfig semantics require every glob to be evaluated relative to a known directory. In-memory scenarios such as unit tests rarely have a meaningful root; permitting an empty root makes Parse(string, ConfigurationParseOptions?) useful end-to-end without forcing every test to supply a path context.

Applies to

ProductVersions
.NET8, 10