Class EmitterExtensions
- Namespace
- Codebelt.Extensions.YamlDotNet
- Assembly
- Codebelt.Extensions.YamlDotNet.dll
Extension methods for the YamlDotNet.Core.IEmitter interface.
public static class EmitterExtensions
- Inheritance
-
EmitterExtensions
Methods
WriteEndArray(IEmitter)
Denotes the end of a YAML array.
public static void WriteEndArray(this IEmitter writer)
Parameters
writerIEmitterThe YamlDotNet.Core.IEmitter to extend.
WriteEndObject(IEmitter)
Denotes the end of a YAML object.
public static void WriteEndObject(this IEmitter writer)
Parameters
writerIEmitterThe YamlDotNet.Core.IEmitter to extend.
WriteObject(IEmitter, object, YamlFormatterOptions)
Serializes the specified value into a YAML format.
public static void WriteObject(this IEmitter writer, object value, YamlFormatterOptions options)
Parameters
writerIEmitterThe YamlDotNet.Core.IEmitter to extend.
valueobjectThe Object to serialize.
optionsYamlFormatterOptionsOptions to control the conversion behavior.
WriteObject(IEmitter, object, Type, YamlFormatterOptions)
Serializes the specified value into a YAML format.
public static void WriteObject(this IEmitter writer, object value, Type valueType, YamlFormatterOptions options)
Parameters
writerIEmitterThe YamlDotNet.Core.IEmitter to extend.
valueobjectThe Object to serialize.
valueTypeTypeThe type of the
valueto convert.optionsYamlFormatterOptionsOptions to control the conversion behavior.
WritePropertyName(IEmitter, string)
Writes the propertyName of an YAML object.
public static void WritePropertyName(this IEmitter writer, string propertyName)
Parameters
writerIEmitterThe YamlDotNet.Core.IEmitter to extend.
propertyNamestringThe name of the YAML object.
WriteStartArray(IEmitter)
Writes the beginning of a YAML array.
public static void WriteStartArray(this IEmitter writer)
Parameters
writerIEmitterThe YamlDotNet.Core.IEmitter to extend.
WriteStartObject(IEmitter)
Writes the beginning of a YAML object.
public static void WriteStartObject(this IEmitter writer)
Parameters
writerIEmitterThe YamlDotNet.Core.IEmitter to extend.
WriteString(IEmitter, string, string, Action<ScalarOptions>)
Writes the propertyName and value as part of a name/value pair of an YAML object.
public static void WriteString(this IEmitter writer, string propertyName, string value, Action<ScalarOptions> setup = null)
Parameters
writerIEmitterThe YamlDotNet.Core.IEmitter to extend.
propertyNamestringThe name of the YAML object.
valuestringThe value to be written as part of the name/value pair of an YAML object.
setupAction<ScalarOptions>The ScalarOptions which may be configured.
WriteValue(IEmitter, string, Action<ScalarOptions>)
Writes the value of an YAML object.
public static void WriteValue(this IEmitter writer, string value, Action<ScalarOptions> setup = null)
Parameters
writerIEmitterThe YamlDotNet.Core.IEmitter to extend.
valuestringThe value to be written as part of the name/value pair of an YAML object.
setupAction<ScalarOptions>The ScalarOptions which may be configured.