Custom attribute that, when applied to a type, causes PostSharp to generate a serializer for use by the PortableFormatter.
Implements
Namespace: PostSharp.Serialization
Assembly: PostSharp.dll
Syntax
[AttributeUsage(AttributeTargets.Assembly|AttributeTargets.Class|AttributeTargets.Struct)]
[MulticastAttributeUsage(MulticastTargets.Class|MulticastTargets.Struct)]
[RequirePostSharp(null, "PortableSerializer")]
[LinesOfCodeAvoided(0)]
public sealed class PSerializableAttribute : MulticastAttribute, IAspect
Remarks
Fields that should not be serialized must be annotated with PNonSerializedAttribute.
This class inherits from MulticastAttribute, so it is possible to use multicasting to add this aspect to several classes using a single line, or to add this aspect to derived classes through inheritance.
Constructors
Name | Description |
---|---|
PSerializableAttribute() |