ConfigurationKeyMapping Enum
Definition
- Namespace
- Bodu.Text.Configuration
- Assembly
- Bodu.Text.Configuration.dll
- Package
- Bodu.Text.Configuration 1.0.0
Selects how raw configuration keys are mapped to the colon-delimited logical keys used by the resolved view and by
Microsoft.Extensions.Configuration.
public enum ConfigurationKeyMapping
- Extension Methods
Fields
DotToColon = 0Dotted file keys map to colon-delimited logical keys:
logging.level.default⇒logging:level:default. This is the default Bodu mapping and the primary v1 mode.Colon = 1File keys already use colon segment separators (
logging:level:default) and are emitted as-is. Provided for callers whose input already matches the MEC logical key shape.Identity = 2File keys are emitted unchanged. The logical configuration key equals the raw key. Use this when integrating with sources that use a custom segment convention.
Remarks
A future release may add a MixedDotAndColon mode that permits a single document to combine both separator
forms; v1 deliberately keeps the surface area small.
// "logging.level" under each mapping:
// DotToColon -> "logging:level" (dots and colons both address it)
// Colon -> "logging:level" (colon canonical form only)
// Identity -> "logging.level" (verbatim)
var keyOptions = new ConfigurationKeyOptions { Mapping = ConfigurationKeyMapping.DotToColon };
Applies to
| Product | Versions |
|---|---|
| .NET | 8, 10 |