PostSharp 6.9 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Serialization Namespace / Serializer­Factory­Provider Class / Serializer­Factory­Provider Methods / Serializer­Factory­Provider.​Add­Serializer Method / Serializer­Factory­Provider.​Add­Serializer Method (Type, Type)

SerializerFactoryProvider.AddSerializer Method (Type, Type)

Maps an object type to a serializer type.

Namespace:  PostSharp.Serialization
Assembly:  PostSharp (in PostSharp.dll) Version: 6.9.11.0 (6.9.11.0)
Syntax
C#
public void AddSerializer(
	Type objectType,
	Type serializerType
)

Parameters

objectType
Type: System.Type
Type of the serialized object.
serializerType
Type: System.Type
Type of the serializer (must be derived from ISerializer).
See Also