YamlReaderState struct
Defines an opaque type that holds and saves all the relevant state information which must be provided to the Utf8YamlReader to continue reading after processing incomplete data. This type is required to support reentrancy when reading incomplete data, and to continue reading once more data is available. Unlike the Utf8YamlReader, which is a ref struct, this type can survive across async/await boundaries and hence this type is required to provide support for reading in more data asynchronously before continuing with a new instance of the Utf8YamlReader.
Namespace: System.Text.Yaml ยท Assembly: Styml.dll
public readonly struct YamlReaderState
Defines an opaque type that holds and saves all the relevant state information which must be provided to the Utf8YamlReader to continue reading after processing incomplete data. This type is required to support reentrancy when reading incomplete data, and to continue reading once more data is available. Unlike the Utf8YamlReader, which is a ref struct, this type can survive across async/await boundaries and hence this type is required to provide support for reading in more data asynchronously before continuing with a new instance of the Utf8YamlReader.
ConstructorsLink to this heading
Constructs a new YamlReaderState instance.
public YamlReaderState(YamlReaderOptions options = default);
Parameters
options: Defines the customized behavior of theUtf8YamlReaderthat is different from the defaults (for example how to handle comments or maximum depth allowed when reading). By default, theUtf8YamlReaderfollows the YAML 1.2 specification and reads up to a maximum depth of 64.
An instance of this state must be passed to the Utf8YamlReader ctor with the YAML data. Unlike the Utf8YamlReader, which is a ref struct, the state can survive across async/await boundaries and hence this type is required to provide support for reading in more data asynchronously before continuing with a new instance of the Utf8YamlReader.
PropertiesLink to this heading
OptionsLink to this heading
Gets the custom behavior when reading YAML using the Utf8YamlReader that may deviate from strict adherence to the YAML specification, which is the default behavior.
public YamlReaderOptions Options { get; }