Table of Contents

TomlReaderOptions Struct

Definition

Namespace
Bodu.Text.Toml.Reader
Assembly
Bodu.Text.Toml.dll
Package
Bodu.Text.Toml 1.0.0
Source
TomlReaderOptions.cs

Defines the customizations applied when creating a TomlDocumentReader.

public struct TomlReaderOptions
Inherited Members
Extension Methods

Remarks

SpecVersion selects the grammar the reader enforces. The default, V1_0 , is the most widely deployed released specification; V1_1 additionally accepts the TOML v1.1.0 grammar features.

MaxDepth bounds the nesting of tables and arrays the reader will materialize, guarding against stack-exhausting input. A value of 0 selects the default of 64, and a larger value is clamped to the hard ceiling Bodu.Text.Toml.TomlLimits.AbsoluteMaxDepth; a document that nests deeper than the effective limit throws TomlFormatException rather than risking a StackOverflowException.

Properties

MaxDepth

Gets or sets the maximum nesting depth of tables and arrays the reader will accept.

public int MaxDepth { readonly get; set; }

Property Value

int

The maximum nesting depth; 0 selects the default of 64, clamped to Bodu.Text.Toml.TomlLimits.AbsoluteMaxDepth.

SpecVersion

Gets or sets the version of the TOML specification the reader enforces.

public TomlSpecVersion SpecVersion { readonly get; set; }

Property Value

TomlSpecVersion

The specification version applied during parsing.

Applies to

ProductVersions
.NET8, 10