TomlParseOptions Class
Configures how TomlSyntaxTree parses text.
public sealed class TomlParseOptions : IEquatable<TomlParseOptions>- Implements
Constructors
| Name | Description |
|---|---|
| TomlParseOptions() |
TomlParseOptions()
TomlParseOptions.cspublic TomlParseOptions()No documentation is available.
Properties
| Name | Description |
|---|---|
| Default | Gets the options used when none are given: the latest version and the default depth. |
| MaxDepth | 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. |
| Version | Gets the version of the specification the text is read as. |
Default
TomlParseOptions.csGets the options used when none are given: the latest version and the default depth.
public static TomlParseOptions Default { get; }Property value
MaxDepth
TomlParseOptions.csGets 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
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.
Version
TomlParseOptions.csGets the version of the specification the text is read as.
public TomlVersion Version { get; init; }Property value
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
| Name | Description |
|---|---|
| Equals(TomlParseOptions?) | |
| Equals(object?) | |
| GetHashCode() | |
| ToString() |
Equals overloads
Equals(TomlParseOptions?)
public bool Equals(TomlParseOptions? other)No documentation is available.
Equals(object?)
GetHashCode()
ToString()
Operators
| Name | Description |
|---|---|
| operator ==(TomlParseOptions?, TomlParseOptions?) | |
| operator !=(TomlParseOptions?, TomlParseOptions?) |
operator ==(TomlParseOptions?, TomlParseOptions?)
public static bool operator ==(TomlParseOptions? left, TomlParseOptions? right)No documentation is available.
operator !=(TomlParseOptions?, TomlParseOptions?)
public static bool operator !=(TomlParseOptions? left, TomlParseOptions? right)No documentation is available.
Constants
| Name | Description |
|---|---|
| DefaultMaxDepth | The default value of TomlParseOptions.MaxDepth. |
DefaultMaxDepth
The default value of TomlParseOptions.MaxDepth.
public const int DefaultMaxDepth = 128