Table of Contents

Class YamlConverter<T>

Namespace
Cuemon.Text.Yaml.Converters
Assembly
Cuemon.Core.dll

Converts an object to or from YAML (YAML ain't markup language).

[Obsolete("All YAML marshalling has been moved to its own assembly; Cuemon.Extensions.YamlDotNet. This member will be removed with next major version.")]
public abstract class YamlConverter<T> : YamlConverter

Type Parameters

T

The type of object or value handled by the converter.

Inheritance
Object
YamlConverter<T>
Derived
Extension Methods

Methods

CanConvert(Type)

Determines whether this instance can convert the specified object type.

public override bool CanConvert(Type typeToConvert)

Parameters

typeToConvert Type

The System.Type of the object.

Returns

Boolean

true if this instance can convert the specified object type; otherwise, false.

ReadYaml(YamlTextReader, Type, YamlSerializerOptions)

Reads and converts the YAML to type T.

public abstract T ReadYaml(YamlTextReader reader, Type typeToConvert, YamlSerializerOptions so)

Parameters

reader YamlTextReader

The reader to read from.

typeToConvert Type

The type to convert.

so YamlSerializerOptions

An object that specifies serialization options to use.

Returns

T

The converted value.

WriteYaml(YamlTextWriter, T, YamlSerializerOptions)

Writes a specified value as YAML.

public abstract void WriteYaml(YamlTextWriter writer, T value, YamlSerializerOptions so)

Parameters

writer YamlTextWriter

The writer to write to.

value T

The value to convert to YAML.

so YamlSerializerOptions

An object that specifies serialization options to use.

See Also