PostSharp SDK 6.10 / / Class Reference / Post­Sharp.​Sdk.​Aspect­Infrastructure Namespace / Method­Body­Transformation­Redirection Class

MethodBodyTransformationRedirection Class

Encapsulates the information by which an IMethodBodyTransformationInstance specifies in which InstructionBlock the next transformation should emit its instructions, and related pieces of information.
Inheritance Hierarchy
System.Object
  PostSharp.Sdk.AspectInfrastructure.MethodBodyTransformationRedirection

Namespace:  PostSharp.Sdk.AspectInfrastructure
Assembly:  PostSharp.Compiler.Engine (in PostSharp.Compiler.Engine.dll) Version: 6.10.14.0 (6.10.14.0)
Syntax
C#
public sealed class MethodBodyTransformationRedirection

The MethodBodyTransformationRedirection type exposes the following members.

Constructors
  NameDescription
Public methodMethodBodyTransformationRedirection()
Creates a new, empty instance of MethodBodyTransformationRedirection, representing no redirection.
Public methodMethodBodyTransformationRedirection(InstructionBlock, InstructionSequence)
Initializes a new MethodBodyTransformationRedirection by specifying an InstructionBlock, typically in the current method body.
Public methodMethodBodyTransformationRedirection(InstructionBlock, InstructionSequence, MethodMapping, LocalVariableSymbol)
Initializes a new MethodBodyTransformationRedirection by specifying an InstructionBlock, typically in a different method body, and the corresponding MethodMapping.
Properties
  NameDescription
Public propertyInstructionBlock
Gets or sets the InstructionBlock in which the next transformation should emit its instructions. nulll if the InstructionBlock is unchanged.
Public propertyLeaveBranchTarget
Gets or sets the InstructionSequence to which the next transformation should redirect the instruction flow when exiting, instead of calling the ret instruction. null if the target is unchanged.
Public propertyMethodMapping
Gets or sets the MethodMapping that maps the context of the new InstructionBlock to the original method. null if the method mapping is unchanged.
Public propertyReturnVariable
Gets or sets the local variable into which the next transformation should store the return value. null if the return value is unchanged.
Methods
  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodSetPipelineStateItem
Sets a piece of information that will be made available to next transformations in the branch created by the current MethodBodyTransformationRedirection. This piece of information can be retrieved by GetPipelineStateItem(Object).
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
See Also