TomlParserOptions Class
Configures the behavior of TomlParser.
public sealed class TomlParserOptions : IEquatable<TomlParserOptions>- Implements
Constructors
| Name | Description |
|---|---|
| TomlParserOptions() |
TomlParserOptions()
public TomlParserOptions()No documentation is available.
Properties
| Name | Description |
|---|---|
| CaptureTrivia | Gets or sets a value indicating whether the parser captures comment trivia. |
| DecodeScalars | Gets or sets a value indicating whether the parser eagerly decodes scalar string literals. When false (default), string values are decoded on demand (for example via TomlParser.GetString). |
| EagerStringValues | Gets or sets a value indicating whether the parser should eagerly materialize simple string values (single-line basic strings without escape sequences) even when TomlParserOptions.DecodeScalars is false. |
| Mode | Gets or sets how the parser handles syntax errors. |
CaptureTrivia
TomlParserOptions.csGets or sets a value indicating whether the parser captures comment trivia.
public bool CaptureTrivia { get; init; }Property value
Remarks
When enabled, the parser records comment trivia around property names and scalar values so that higher-level layers can populate ITomlMetadataStore instances.
DecodeScalars
TomlParserOptions.csGets or sets a value indicating whether the parser eagerly decodes scalar string literals. When false (default), string values are decoded on demand (for example via TomlParser.GetString).
public bool DecodeScalars { get; init; }Property value
EagerStringValues
TomlParserOptions.csGets or sets a value indicating whether the parser should eagerly materialize simple string values (single-line basic strings without escape sequences) even when TomlParserOptions.DecodeScalars is false.
public bool EagerStringValues { get; init; }Property value
Remarks
This option can improve performance for deserialization scenarios that always consume string values (for example, via TomlReader.GetString), while still avoiding eager decoding for complex strings that contain escape sequences.
Gets or sets how the parser handles syntax errors.
public TomlParserMode Mode { get; init; }Methods
| Name | Description |
|---|---|
| Equals(TomlParserOptions?) | |
| Equals(object?) | |
| GetHashCode() | |
| ToString() |
Equals overloads
Equals(TomlParserOptions?)
public bool Equals(TomlParserOptions? other)No documentation is available.
Equals(object?)
GetHashCode()
ToString()
Operators
| Name | Description |
|---|---|
| operator ==(TomlParserOptions?, TomlParserOptions?) | |
| operator !=(TomlParserOptions?, TomlParserOptions?) |
operator ==(TomlParserOptions?, TomlParserOptions?)
public static bool operator ==(TomlParserOptions? left, TomlParserOptions? right)No documentation is available.
operator !=(TomlParserOptions?, TomlParserOptions?)
public static bool operator !=(TomlParserOptions? left, TomlParserOptions? right)No documentation is available.