YamlDocument Class

Represents the Yaml Document.

public class YamlDocument : YamlNode
Inheritance
YamlNode YamlDocument

Constructors

NameDescription
YamlDocument()Initializes a new instance of this type.

YamlDocument()

YamlDocument.cs

Initializes a new instance of this type.

public YamlDocument()

Properties

NameDescription
ContentsGets contents.
DocumentEndGets document End.
DocumentStartGets document Start.

Gets contents.

public YamlElement? Contents { get; set; }

Property value

YamlElement?

DocumentEnd

YamlDocument.cs

Gets document End.

public DocumentEnd DocumentEnd { get; set; }

Property value

DocumentEnd

DocumentStart

YamlDocument.cs

Gets document Start.

public DocumentStart DocumentStart { get; set; }

Property value

DocumentStart

Methods

NameDescription
DeepClone()Creates a deep clone of the current value.
Load(EventReader)Loads data.
Load(EventReader, YamlSerializerOptions?)Loads data, honoring the anchor, alias and alias-expansion limits of options.

DeepClone()

YamlDocument.cs

Creates a deep clone of the current value.

public override YamlNode DeepClone()

Returns

YamlNode

Load overloads

Load(EventReader)

YamlDocument.cs

Loads data.

public static YamlDocument Load(EventReader eventReader)
Parameters
eventReader EventReader
Returns

YamlDocument

Load(EventReader, YamlSerializerOptions?)

YamlDocument.cs

Loads data, honoring the anchor, alias and alias-expansion limits of options.

public static YamlDocument Load(EventReader eventReader, YamlSerializerOptions? options)
Parameters
eventReader EventReader
The event reader.
options YamlSerializerOptions?
The options used to bound alias expansion. If null, YamlSerializerOptions.Default is used.
Returns

YamlDocument