Table of Contents

ConfigurationMissingPathRootMode Enum

Definition

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

Selects what Resolve(IniDocumentBase, string?, ConfigurationResolveOptions?) does when it receives no target path and no root is known: no PathRoot was supplied and the document was not loaded from a file.

public enum ConfigurationMissingPathRootMode
Extension Methods

Fields

UseEmptyRoot = 0

Resolve against an empty root: with no target path no section applies, and the view holds only what the preamble contributes. This is the default for the Bodu and Relaxed profiles.

Throw = 1

Throw InvalidOperationException. This is the default for the EditorConfigCompatible and Strict profiles.

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. A document loaded with Load(string, ConfigurationParseOptions?) is rooted at the directory of its file, so this mode never applies to it.

Applies to

ProductVersions
.NET8, 10