Table of Contents

Class Formatter<TFormat>

Namespace
Cuemon.Runtime.Serialization.Formatters
Assembly
Cuemon.Core.dll

An abstract class that supports serialization and deserialization of an object, in a given format.

public abstract class Formatter<TFormat>

Type Parameters

TFormat

The type of format which serialization and deserialization is invoked.

Inheritance
Object
Formatter<TFormat>
Derived

Constructors

Formatter()

Initializes a new instance of the Formatter<TFormat> class.

protected Formatter()

Methods

Deserialize(TFormat, Type)

Deserializes the specified value of TFormat into an object of objectType.

public abstract object Deserialize(TFormat value, Type objectType)

Parameters

value TFormat

The object from which to deserialize the object graph.

objectType Type

The type of the deserialized object.

Returns

Object

An object of objectType.

Deserialize<T>(TFormat)

Deserializes the specified value of TFormat into an object of T.

public T Deserialize<T>(TFormat value)

Parameters

value TFormat

The object from which to deserialize the object graph.

Returns

T

An object of T.

Type Parameters

T

The type of the object to return.

Serialize(Object)

Serializes the specified source to an object of TFormat.

public TFormat Serialize(object source)

Parameters

source Object

The object to serialize to a given format.

Returns

TFormat

An object of the serialized source.

Serialize(Object, Type)

Serializes the object of this instance to an object of TFormat.

public abstract TFormat Serialize(object source, Type objectType)

Parameters

source Object

The object to serialize to a given format.

objectType Type

The type of the object to serialize.

Returns

TFormat

An object of the serialized source.