MethodBodyTransformationContext.AddRedirection Method (InstructionBlock, InstructionSequence, MethodMapping, LocalVariableSymbol) |
Namespace: PostSharp.Sdk.AspectInfrastructure
Assembly: PostSharp.Compiler.Engine (in PostSharp.Compiler.Engine.dll) Version: 2023.0.3.0 (2023.0.3.0)
public MethodBodyTransformationRedirection AddRedirection( InstructionBlock instructionBlock, InstructionSequence leaveBranchTarget, MethodMapping methodMapping, LocalVariableSymbol returnVariable )
Parameters
- instructionBlock
- Type: PostSharp.Sdk.CodeModel.InstructionBlock
Instruction block in which the next transformation should be implemented, or null if the instruction block is not modified. - leaveBranchTarget
- Type: PostSharp.Sdk.CodeModel.InstructionSequence
Instruction sequence to which the next transformation should go to when existing (instead of emitting the ret instruction), or null if the leave target is not modified. - 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.
Return Value
Type: MethodBodyTransformationRedirectionThe MethodBodyTransformationRedirection that has been created.