Open sandboxFocus

Method AddSerializer

AddSerializer<TObject, TSerializer>()

Maps an object type to a serializer type (using generic type parameters).

Declaration
public void AddSerializer<TObject, TSerializer>() where TSerializer : ISerializer, new()
Type Parameters
Name Description
TObject

Type of the serialized object.

TSerializer

Type of the serializer.

AddSerializer(Type, Type)

Maps an object type to a serializer type.

Declaration
public void AddSerializer(Type objectType, Type serializerType)
Parameters
Type Name Description
Type objectType

Type of the serialized object.

Type serializerType

Type of the serializer (must be derived from ISerializer).