Class DynamicYaml
Allows to manipulate dynamically a YAML content.
public class DynamicYaml
- Inheritance
-
DynamicYaml
- Derived
Constructors
DynamicYaml(Stream, bool)
Initializes a new instance of DynamicYaml from the specified stream.
public DynamicYaml(Stream stream, bool disposeStream = true)
Parameters
stream
StreamA stream that contains a YAML content. The stream will be disposed
disposeStream
boolDispose the stream when reading the YAML content is done.
true
by default
DynamicYaml(string)
Initializes a new instance of DynamicYaml from the specified stream.
public DynamicYaml(string text)
Parameters
text
stringA text that contains a YAML content
Properties
DynamicRootNode
Gets a dynamic YAML node around the RootNode.
public dynamic DynamicRootNode { get; }
Property Value
- dynamic
RootNode
Gets the root YAML node.
public YamlMappingNode RootNode { get; }
Property Value
- YamlMappingNode
Methods
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
WriteTo(Stream, SerializerSettings)
Writes the content of this YAML node to the specified stream.
public void WriteTo(Stream stream, SerializerSettings settings)
Parameters
stream
StreamThe stream to output YAML to.
settings
SerializerSettingsThe settings to use to generate YAML. If null, a default Stride.Core.Yaml.Serialization.SerializerSettings will be used.
WriteTo(TextWriter, SerializerSettings)
Writes the content of this YAML node to the specified writer.
public void WriteTo(TextWriter writer, SerializerSettings settings)
Parameters
writer
TextWriterThe writer to output YAML to.
settings
SerializerSettingsThe settings to use to generate YAML. If null, a default Stride.Core.Yaml.Serialization.SerializerSettings will be used.