PostSharp SDK 2023.0 / / Class Reference / Post­Sharp.​Sdk.​Aspect­Infrastructure Namespace / Method­Body­Transformation­Redirection Class / Method­Body­Transformation­Redirection Constructor / Method­Body­Transformation­Redirection Constructor (Instruction­Block, Instruction­Sequence, Method­Mapping, Local­Variable­Symbol)

MethodBodyTransformationRedirection Constructor (InstructionBlock, InstructionSequence, MethodMapping, LocalVariableSymbol)

Initializes a new MethodBodyTransformationRedirection by specifying an InstructionBlock, typically in a different method body, and the corresponding MethodMapping.

Namespace:  PostSharp.Sdk.AspectInfrastructure
Assembly:  PostSharp.Compiler.Engine (in PostSharp.Compiler.Engine.dll) Version: 2023.0.3.0 (2023.0.3.0)
Syntax
C#
public MethodBodyTransformationRedirection(
	InstructionBlock instructionBlock,
	InstructionSequence leaveBranchTarget,
	MethodMapping methodMapping,
	LocalVariableSymbol returnVariable
)

Parameters

instructionBlock
Type: PostSharp.Sdk.CodeModel.InstructionBlock
The InstructionBlock in which the next transformation should emit its instruction, or null if the instruction block is unchanged.
leaveBranchTarget
Type: PostSharp.Sdk.CodeModel.InstructionSequence
The InstructionSequence to which the next transformation should branch the instruction flow when exiting, instead of emitting the ret instruction.
methodMapping
Type: PostSharp.Sdk.AspectInfrastructure.MethodMapping
The method mapping for the new instructionBlock, or null if the method mapping is not modified.
returnVariable
Type: PostSharp.Sdk.CodeModel.LocalVariableSymbol
The variable in which the next transformation should store the return value, or null if the return variable is not modified.
See Also