DynamicYaml Class
Namespace: Stride.Core.YamlAssembly: Stride.Core.Assets.dll
Allows to manipulate dynamically a YAML content.
public class DynamicYaml
Name | Description | |
---|---|---|
Constructors | ||
DynamicYaml(Stream, Boolean) | Initializes a new instance of DynamicYaml from the specified stream. |
|
DynamicYaml(String) | Initializes a new instance of DynamicYaml from the specified stream. |
|
Properties | ||
DynamicRootNode | Gets a dynamic YAML node around the RootNode. |
|
RootNode | Gets the root YAML node. |
|
Methods | ||
ToString() | ||
WriteTo(Stream, SerializerSettings) | Writes the content of this YAML node to the specified stream. |
|
WriteTo(TextWriter, SerializerSettings) | Writes the content of this YAML node to the specified writer. |
Constructors
DynamicYaml(Stream, Boolean)
Initializes a new instance of DynamicYaml from the specified stream.
public DynamicYaml(Stream stream, bool disposeStream = true)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | A stream that contains a YAML content. The stream will be disposed |
System.Boolean | disposeStream | Dispose the stream when reading the YAML content is done. |
DynamicYaml(String)
Initializes a new instance of DynamicYaml from the specified stream.
public DynamicYaml(string text)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | A text that contains a YAML content |
Properties
DynamicRootNode
Gets a dynamic YAML node around the RootNode.
public dynamic DynamicRootNode { get; }
Property Value
Type | Description |
---|---|
System.Object |
RootNode
Gets the root YAML node.
public YamlMappingNode RootNode { get; }
Property Value
Type | Description |
---|---|
Stride.Core.Yaml.Serialization.YamlMappingNode |
Methods
ToString()
public override string ToString()
Returns
Type | Description |
---|---|
System.String |
Overrides
WriteTo(Stream, SerializerSettings)
Writes the content of this YAML node to the specified stream.
public void WriteTo(Stream stream, SerializerSettings settings)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | The stream to output YAML to. |
Stride.Core.Yaml.Serialization.SerializerSettings | settings | The 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
Type | Name | Description |
---|---|---|
System.IO.TextWriter | writer | The writer to output YAML to. |
Stride.Core.Yaml.Serialization.SerializerSettings | settings | The settings to use to generate YAML. If null, a default Stride.Core.Yaml.Serialization.SerializerSettings will be used. |