PostSharp SDK 6.9 / / Class Reference / Post­Sharp.​Sdk.​Aspect­Weaver Namespace / Aspect­Weaver­Instance Class / Aspect­Weaver­Instance Methods / Aspect­Weaver­Instance.​Emit­Runtime­Initialization Method

AspectWeaverInstance.EmitRuntimeInitialization Method

Emits instructions that initialize the aspect at runtime. These instructions will be injected in the static constructor of the PostSharp implementation details object, after the field containing the runtime instance of the instance (AspectRuntimeInstanceField) has been initialized.

Namespace:  PostSharp.Sdk.AspectWeaver
Assembly:  PostSharp.Compiler.Engine (in PostSharp.Compiler.Engine.dll) Version: 6.9.11.0 (6.9.11.0)
Syntax
C#
public virtual void EmitRuntimeInitialization(
	InstructionWriter writer,
	InstructionBlock block
)

Parameters

writer
Type: PostSharp.Sdk.CodeModel.InstructionWriter
An InstructionWriter.
block
Type: PostSharp.Sdk.CodeModel.InstructionBlock
The InstructionBlock into which instructions have to be emitted.
Remarks
It is expected that implementations generate only simple streams of instructions, without branching instructions. If more complexity is required, they should generate auxiliary methods.
See Also