Open sandboxFocus

Class AspectSerializer

Base class for all aspect serializers, whose role is to serialize aspect instances at compile time and deserialize them at runtime.

Namespace: PostSharp.Aspects.Serialization
Assembly: PostSharp.dll
Syntax
public abstract class AspectSerializer
Remarks

The weaver chooses the serializer of an aspect class from the SerializerType configuration property or, when it is not set, from the aspect class. Aspect classes that have a nested Serializer type, which is generated for classes annotated with PSerializableAttribute, use PortableAspectSerializer. When a class annotated with PSerializableAttribute has no such type, the build fails with the error LA0157. To build the aspect at run time instead of serializing it, use MsilAspectSerializer.

Constructors

Name Description
AspectSerializer()

Methods

Name Description
Deserialize(Stream, IMetadataDispenser)

Deserializes a stream into an array of aspects.

Deserialize(Assembly, string, IMetadataDispenser)

Deserializes aspects contained in a managed resource of an assembly.

Serialize(IAspect[], Stream, IMetadataEmitter)

Serializes an array of aspects into a stream.

See Also