PostSharpAPI ReferencePost­Sharp.​SerializationPSerializable­Attribute
Open sandboxFocus

PSerializableAttribute Class

Custom attribute that, when applied to a type, causes PostSharp to generate a serializer for use by the PortableFormatter.

Inheritance
System.Object
PSerializableAttribute
Implements
IAspect
Namespace: PostSharp.Serialization
Assembly: PostSharp.dll
Syntax
[MulticastAttributeUsage]
[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()

See Also