PostSharp 2023.0 / / 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(TObject, TSerializer) Method

SerializerFactoryProvider.AddSerializer<TObject, TSerializer> Method

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

Namespace:  PostSharp.Serialization
Assembly:  PostSharp (in PostSharp.dll) Version: 2023.0.3.0 (2023.0.3.0)
Syntax
C#
public void AddSerializer<TObject, TSerializer>()
where TSerializer : new(), ISerializer

Type Parameters

TObject
Type of the serialized object.
TSerializer
Type of the serializer.
See Also