Table of Contents

Class YamlFormatter

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

Serializes and deserializes an object, in YAML format.

[Obsolete("All YAML marshalling has been moved to its own assembly; Cuemon.Extensions.YamlDotNet. This member will be removed with next major version.")]
public class YamlFormatter : StreamFormatter<YamlFormatterOptions>, IConfigurable<YamlFormatterOptions>
Inheritance
Object
Formatter<Stream>
YamlFormatter
Implements
Inherited Members

Constructors

YamlFormatter()

Initializes a new instance of the YamlFormatter class.

public YamlFormatter()

YamlFormatter(YamlFormatterOptions)

Initializes a new instance of the YamlFormatter class.

public YamlFormatter(YamlFormatterOptions options)

Parameters

options YamlFormatterOptions

The configured YamlFormatterOptions.

YamlFormatter(Action<YamlFormatterOptions>)

Initializes a new instance of the YamlFormatter class.

public YamlFormatter(Action<YamlFormatterOptions> setup)

Parameters

setup Action<YamlFormatterOptions>

The YamlFormatterOptions which need to be configured.

Methods

Deserialize(Stream, Type)

Deserializes the specified value into an object of objectType.

public override object Deserialize(Stream value, Type objectType)

Parameters

value Stream

The object from which to deserialize the object graph.

objectType Type

The type of the deserialized object.

Returns

Object

An object of objectType.

Exceptions

System.ArgumentNullException

value is null -or- objectType is null.

Serialize(Object, Type)

Serializes the specified source to an object of System.IO.Stream.

public override Stream Serialize(object source, Type objectType)

Parameters

source Object

The object to serialize to YAML format.

objectType Type

The type of the object to serialize.

Returns

Stream

A stream of the serialized source.

Exceptions

System.ArgumentNullException

source is null -or- objectType is null.

See Also