Metalama 1.0 / / Metalama Documentation / Aspect API / Metalama.​Framework.​Serialization / Import­Serializer­Attribute

Class ImportSerializerAttribute

Custom attribute that, when applied to a serializable type, specifies that the serializer of this type has a dependency on another serializer. The custom attribute can be applied at assembly level; it then applies to all serializable types in this assembly.

Inheritance
ImportSerializerAttribute
Namespace: Metalama.Framework.Serialization
Assembly: Metalama.Framework.dll
Syntax
public sealed class ImportSerializerAttribute : Attribute
Remarks

This custom attribute is useful to add serializers to types of third-party assemblies. For types whose source code you can modify, it is preferable to use ICompileTimeSerializable.

Constructors

Name Description
ImportSerializerAttribute(Type, Type)

Initializes a new instance of the ImportSerializerAttribute class.

Properties

Name Description
ObjectType

Gets the type of the object to be made serializable.

SerializerType

Gets the serializer type.