Open sandboxFocus

Class MsilAspectSerializer

When used as a value of AspectConfigurationAttribute.SerializerType property, specifies that the aspect should not be serialized but should instead be constructed at runtime using MSIL instructions.

Inheritance
MsilAspectSerializer
Namespace: PostSharp.Aspects.Serialization
Assembly: PostSharp.dll
Syntax
public sealed class MsilAspectSerializer : AspectSerializer
Remarks

This class is not a serializer. When you use MSIL aspect construction, the aspect is instantiated at runtime just as a normal custom attribute, and any initialization made at build time is lost. Choose it when the state of the aspect depends only on the constructor arguments and properties of the custom attribute, that is, when the aspect does not initialize itself at build time. Building the aspect at run time can then be more efficient than deserializing it.

Constructors

Name Description
MsilAspectSerializer()

Methods

Name Description
Deserialize(Stream, IMetadataDispenser)

Deserializes a stream into an array of aspects.

Serialize(IAspect[], Stream, IMetadataEmitter)

Serializes an array of aspects into a stream.

See Also