YamlNode Class

Represents the Yaml Node.

public abstract class YamlNode

Constructors

NameDescription
YamlNode()

YamlNode()

protected YamlNode()

No documentation is available.

Methods

NameDescription
DeepClone()Creates a deep clone of the current value.
EnumerateEvents()Enumerates parsing events for this YAML node.
FromObject(object, YamlSerializerOptions?, Type?)Creates a YAML element from an object.
ReadElement(EventReader)Reads the next YAML element from the event stream.
ToObject(Type, YamlSerializerOptions?)Converts this YAML node to an object.
ToObject<T>(YamlSerializerOptions?)Converts this node to an instance of T.
ToString()Returns a string representation of the current instance.
WriteTo(IEmitter, bool)Writes to.
WriteTo(TextWriter, bool)Writes to.

DeepClone()

Creates a deep clone of the current value.

public abstract YamlNode DeepClone()

Returns

YamlNode

EnumerateEvents()

YamlNode.cs

Enumerates parsing events for this YAML node.

public IEnumerable<ParsingEvent> EnumerateEvents()

FromObject(object, YamlSerializerOptions?, Type?)

YamlNode.cs

Creates a YAML element from an object.

public static YamlElement FromObject(object value, YamlSerializerOptions? options = null, Type? expectedType = null)

Parameters

value object
options YamlSerializerOptions?
expectedType Type?

Returns

YamlElement

ReadElement(EventReader)

YamlNode.cs

Reads the next YAML element from the event stream.

protected static YamlElement? ReadElement(EventReader eventReader)

Parameters

eventReader EventReader

Returns

YamlElement?

ToObject overloads

ToObject(Type, YamlSerializerOptions?)

YamlNode.cs

Converts this YAML node to an object.

public object? ToObject(Type type, YamlSerializerOptions? options = null)
Parameters
type Type
options YamlSerializerOptions?
Returns

object?

ToObject<T>(YamlSerializerOptions?)

YamlNode.cs

Converts this node to an instance of T.

public T? ToObject<T>(YamlSerializerOptions? options = null)
Type parameters
T
Parameters
options YamlSerializerOptions?
Returns

T?

ToString()

YamlNode.cs

Returns a string representation of the current instance.

public override string ToString()

Returns

string

WriteTo overloads

WriteTo(IEmitter, bool)

YamlNode.cs

Writes to.

public void WriteTo(IEmitter emitter, bool suppressDocumentTags = false)
Parameters
emitter IEmitter
suppressDocumentTags bool

WriteTo(TextWriter, bool)

YamlNode.cs

Writes to.

public void WriteTo(TextWriter writer, bool suppressDocumentTags = false)
Parameters
writer TextWriter
suppressDocumentTags bool