TomlDocumentOptions Struct

Options of TomlDocument.Parse.

public struct TomlDocumentOptions

Properties

NameDescription
DuplicateKeyHandlingGets or sets how a key defined twice in a table is handled. TOML does not allow it, so the default is TomlDuplicateKeyHandling.Error.
MaxDepthGets or sets the maximum nesting depth of the document, the root table being one level, and an array of tables and its elements one level each. 0 means the default of 64.
SourceNameGets or sets the name used in the location of errors, such as a file path.

DuplicateKeyHandling

TomlDocumentOptions.cs

Gets or sets how a key defined twice in a table is handled. TOML does not allow it, so the default is TomlDuplicateKeyHandling.Error.

public TomlDuplicateKeyHandling DuplicateKeyHandling { readonly get; set; }

Property value

TomlDuplicateKeyHandling

Exceptions

ArgumentOutOfRangeException
The value is not a defined TomlDuplicateKeyHandling.

Gets or sets the maximum nesting depth of the document, the root table being one level, and an array of tables and its elements one level each. 0 means the default of 64.

public int MaxDepth { readonly get; set; }

Property value

int

Exceptions

ArgumentOutOfRangeException
The value is negative.

Gets or sets the name used in the location of errors, such as a file path.

public string? SourceName { readonly get; set; }

Property value

string?