PostSharpAPI ReferencePost­Sharp.​SerializationSerializer­Factory­ProviderAdd­Serializer
Open sandboxFocus

SerializerFactoryProvider.AddSerializer Method

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
System.Type objectType

Type of the serialized object.

System.Type serializerType

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