PostSharp 6.6 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Reflection.​Method­Body Namespace / Method­Body­Visitor Class

MethodBodyVisitor Class

Abstract implementation of a visitor of method bodies (IMethodBody and IExpression).
Inheritance Hierarchy
System.Object
  PostSharp.Reflection.MethodBody.MethodBodyVisitor
    PostSharp.Reflection.MethodBody.MethodBodyFormatter

Namespace:  PostSharp.Reflection.MethodBody
Assembly:  PostSharp (in PostSharp.dll) Version: 6.6.14.0 (6.6.14.0)
Syntax
C#
public abstract class MethodBodyVisitor

The MethodBodyVisitor type exposes the following members.

Constructors
  NameDescription
Protected methodMethodBodyVisitor
Initializes a new instance of the MethodBodyVisitor class
Methods
  NameDescription
Public methodVisitAddressOfExpression
Visits an expression of type IAddressOfExpression and, recursively, all children elements.
Public methodVisitBinaryExpression
Visits an expression of type IBinaryExpression and, recursively, all children elements.
Public methodVisitBlockExpression
Visits an instruction block and, recursively, all syntax nodes.
Public methodVisitConditionalExpression
Visits an expression of type IUnaryExpression and, recursively, all children elements.
Public methodVisitConstantExpression
Visits an expression of type IGotoExpression.
Public methodVisitCopyBufferExpression
Visits an expression of type ICopyBufferExpression and, recursively, all children elements.
Public methodVisitFieldExpression
Visits an expression of type IFieldExpression.
Public methodVisitGotoExpression
Visits an expression of type IGotoExpression.
Public methodVisitInitBufferExpression
Visits an expression of type IInitBufferExpression and, recursively, all children elements.
Public methodVisitLocalVariable
Visits a local variable definition.
Public methodVisitMetadataExpression
Visits an expression of type IMetadataExpression.
Public methodVisitMethodBody
Visits a method body and, recursively, all syntax nodes.
Public methodVisitMethodCallExpression
Visits an expression of type IMethodCallExpression and, recursively, all children elements.
Public methodVisitMethodPointerExpression
Visits an expression of type IMethodPointerExpression and, recursively, all children elements.
Public methodVisitNewArrayExpression
Visits an expression of type INewArrayExpression and, recursively, all children elements.
Public methodVisitNewObjectExpression
Visits an expression of type INewObjectExpression and, recursively, all children elements.
Public methodVisitParameterExpression
Visits an expression of type IParameterExpression.
Public methodVisitStatementExpression
Visits an instruction block and, recursively, all syntax nodes.
Public methodVisitSwitchExpression
Visits an expression of type ISwitchExpression and, recursively, all children elements.
Public methodVisitSyntaxElement
Visits a syntax element and, recursively, all children elements.
Public methodVisitUnaryExpression
Visits an expression of type IUnaryExpression and, recursively, all children elements.
Public methodVisitValueOfExpression
Visits an expression of type IValueOfExpression and, recursively, all children elements.
Public methodVisitVariableExpression
Visits an expression of type ILocalVariableExpression.
Public methodVisitZeroaryExpression
Visits an expression of type IZeroaryExpression.
Remarks

This class provides an abstract implementation, which only ensures that the proper visiting method gets called for every node of the tree, without any other effect. Concrete implementations typically override specific visiting methods, and call the base implementation to ensure that children nodes are being processed too.

See Also