PostSharp SDK 2023.0 / / Class Reference / Post­Sharp.​Sdk.​Aspect­Infrastructure Namespace / Method­Body­Transformation­Context Class / Method­Body­Transformation­Context Properties

MethodBodyTransformationContext Properties

The MethodBodyTransformationContext type exposes the following members.

Properties
  NameDescription
Public propertyBindingsContainerType
Gets the type in which binding classes should be created.
Public propertyInstructionBlock
Gets the InstructionBlock in which the current transformation should emit instructions.
Public propertyIsBranched
Determines if the current pipeline instance has been branched, i.e. if there are multiple branches if the same pipeline at this stage.
Public propertyLeaveBranchTarget
Gets the InstructionSequence to which the current transformation should branch the instruction flow when exiting, instead of emitting the ret instruction.
Public propertyMethodMapping
Gets the MethodMapping that maps the context of the current InstructionBlock to the original method body.
Public propertyMethodSemantic
Gets the semantic of the method being transformed, if the method is a member of an event or a property.
(Inherited from TransformationContext.)
Public propertyMustAddSymJoinPoint
Determines whether the current transformation is expected to add a join point symbol.
(Inherited from TransformationContext.)
Public propertyOrdinal
Gets the ordinal of the current transformation in the transformation pipeline.
(Inherited from TransformationContext.)
Public propertyOriginalTargetElement
Gets the element of code to which the transformation pipeline was originally applied. The pipeline may have redirected, created a new element of code in replacement of the original one. In this case, this property contains the original element of code, and the TargetElement property contains the replacement element of code.
(Inherited from TransformationContext.)
Public propertyReturnValueVariable
Gets the local variable in which the current transformation should store the return value.
Public propertyStateMachine
Gets or sets additional information about the context. This additional information is only relevant for transformations that happen inside a MoveNext method of a state machine. This information is not deeply copied: This means that if you add two redirections while inside a MoveNext method, the result will be strange.
Public propertyTargetElement
Gets the element of code being currently transformed by the transformation pipeline. The pipeline may have created a new element of code in replacement of the original one. In this case, the OriginalTargetElement property contains the original element of code, and the current property contains the replacement element of code.
(Inherited from TransformationContext.)
Public propertyTransversalState
Gets an object allowing transformations to share state between pipelines targeting different methods of the same property or event.
(Inherited from TransformationContext.)
See Also