TomlParseOptions Class

Configures how TomlSyntaxTree parses text.

public sealed class TomlParseOptions : IEquatable<TomlParseOptions>
Implements

Constructors

NameDescription
TomlParseOptions()

TomlParseOptions()

TomlParseOptions.cs
public TomlParseOptions()

No documentation is available.

Properties

NameDescription
DefaultGets the options used when none are given: the latest version and the default depth.
MaxDepthGets how deeply arrays and inline tables may nest before the parser reports TOML0012 and keeps the rest as skipped text. Guards against a stack overflow on deeply nested input.
VersionGets the version of the specification the text is read as.

Gets the options used when none are given: the latest version and the default depth.

public static TomlParseOptions Default { get; }

Property value

TomlParseOptions

Gets how deeply arrays and inline tables may nest before the parser reports TOML0012 and keeps the rest as skipped text. Guards against a stack overflow on deeply nested input.

public int MaxDepth { get; init; }

Property value

int

Exceptions

ArgumentOutOfRangeException
The value is less than one.

Remarks

Raising it is safe: nesting that would not fit on the stack of the thread doing the parsing is reported as TOML0012 as well, whatever the limit says.

Gets the version of the specification the text is read as.

public TomlVersion Version { get; init; }

Property value

TomlVersion

Exceptions

ArgumentOutOfRangeException
The value is not one of the versions of TomlVersion.

Remarks

What a later version allows is reported as an error when parsing as an earlier one.

Methods

NameDescription
Equals(TomlParseOptions?)
Equals(object?)
GetHashCode()
ToString()

Equals overloads

Equals(TomlParseOptions?)

public bool Equals(TomlParseOptions? other)
Parameters
other TomlParseOptions?
Returns

bool

No documentation is available.

Equals(object?)

public override bool Equals(object? obj)
Parameters
obj object?
Returns

bool

No documentation is available.

GetHashCode()

public override int GetHashCode()

Returns

int

No documentation is available.

ToString()

public override string ToString()

Returns

string

No documentation is available.

Operators

NameDescription
operator ==(TomlParseOptions?, TomlParseOptions?)
operator !=(TomlParseOptions?, TomlParseOptions?)

operator ==(TomlParseOptions?, TomlParseOptions?)

public static bool operator ==(TomlParseOptions? left, TomlParseOptions? right)

Parameters

left TomlParseOptions?
right TomlParseOptions?

Returns

bool

No documentation is available.

operator !=(TomlParseOptions?, TomlParseOptions?)

public static bool operator !=(TomlParseOptions? left, TomlParseOptions? right)

Parameters

left TomlParseOptions?
right TomlParseOptions?

Returns

bool

No documentation is available.

Constants

NameDescription
DefaultMaxDepthThe default value of TomlParseOptions.MaxDepth.

DefaultMaxDepth

The default value of TomlParseOptions.MaxDepth.

public const int DefaultMaxDepth = 128