PostSharp 2023.0 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Serialization Namespace / Import­Serializer­Attribute Class / Import­Serializer­Attribute Constructor

ImportSerializerAttribute Constructor

Initializes a new ImportSerializerAttribute.

Namespace:  PostSharp.Serialization
Assembly:  PostSharp (in PostSharp.dll) Version: 2023.0.3.0 (2023.0.3.0)
Syntax
C#
public ImportSerializerAttribute(
	Type objectType,
	Type serializerType
)

Parameters

objectType
Type: System.Type
Type of the object to be made serializable.
serializerType
Type: System.Type
Serializer type. This type must implement ISerializer or ISerializerFactory, and must have a public default constructor. If serializerType is a generic type, if must have the same number of generic type parameters as objectType, and have a compatible set of constraints.
See Also