Version 2.1.0.0

IFormatter<T> interface

Namespace: Sirenix.Serialization
Assembly: Sirenix.Serialization
public interface IFormatter<T> : IFormatter
Serializes and deserializes a given type T.

Type Parameters

T

The type which can be serialized and deserialized by the formatter.

Methods

Deserialize(IDataReader)
Deserializes a value of type using a specified IDataReader.
T Deserialize(IDataReader reader)
Parameters
IDataReader reader

The reader to use.

Returns
T

The deserialized value.

Serialize(T, IDataWriter)
Serializes a value of type using a specified IDataWriter.
void Serialize(T value, IDataWriter writer)
Parameters
T value

The value to serialize.

IDataWriter writer

The writer to use.