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
TFormatThe type of format which serialization and deserialization is invoked.
- Inheritance
-
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
valueTFormatThe object from which to deserialize the object graph.
objectTypeTypeThe 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
valueTFormatThe object from which to deserialize the object graph.
Returns
- T
An object of
T.
Type Parameters
TThe type of the object to return.
Serialize(object)
Serializes the specified source to an object of TFormat.
public TFormat Serialize(object source)
Parameters
sourceobjectThe 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
sourceobjectThe object to serialize to a given format.
objectTypeTypeThe type of the object to serialize.
Returns
- TFormat
An object of the serialized
source.