YamlWriterOptions Struct
Definition
Provides options that configure how Utf8YamlWriter emits YAML.
public struct YamlWriterOptions
- Inherited Members
- Extension Methods
Properties
IndentSize
Gets or sets the number of spaces used for each level of block indentation.
public int IndentSize { readonly get; set; }
Property Value
- int
The indentation width. A value of zero or less selects the default of two; the largest supported width is 16.
Remarks
A value above 16 is not clamped: creating a Utf8YamlWriter with it throws ArgumentOutOfRangeException.
MaxDepth
Gets or sets the maximum container nesting depth permitted while writing.
public int MaxDepth { readonly get; set; }
Property Value
- int
The maximum depth as set. A value of zero or less selects the default of 64, and a larger value is clamped to the hard ceiling of 64; the property returns the value as set, so it reads
0until it is set.
NewLine
Gets or sets the line-break sequence written at the end of each line.
public string? NewLine { readonly get; set; }
Property Value
- string
The newline string; the default is a single line feed (
\n).
Applies to
| Product | Versions |
|---|---|
| .NET | 8, 10 |