PostSharpAPI ReferencePost­Sharp.​Reflection.​Method­BodyMethod­Body­Visitor
Open sandboxFocus

MethodBodyVisitor Class

Abstract implementation of a visitor of method bodies (IMethodBody and IExpression).

Inheritance
MethodBodyVisitor
Namespace: PostSharp.Reflection.MethodBody
Assembly: PostSharp.dll
Syntax
public abstract class MethodBodyVisitor : Object
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.

Constructors

Name Description
MethodBodyVisitor()

Methods

Name Description
VisitAddressOfExpression(IAddressOfExpression)

Visits an expression of type IAddressOfExpression and, recursively, all children elements.

VisitBinaryExpression(IBinaryExpression)

Visits an expression of type IBinaryExpression and, recursively, all children elements.

VisitBlockExpression(IBlockExpression)

Visits an instruction block and, recursively, all syntax nodes.

VisitConditionalExpression(IConditionalExpression)

Visits an expression of type IUnaryExpression and, recursively, all children elements.

VisitConstantExpression(IConstantExpression)

Visits an expression of type IGotoExpression.

VisitCopyBufferExpression(ICopyBufferExpression)

Visits an expression of type ICopyBufferExpression and, recursively, all children elements.

VisitFieldExpression(IFieldExpression)

Visits an expression of type IFieldExpression.

VisitGotoExpression(IGotoExpression)

Visits an expression of type IGotoExpression.

VisitInitBufferExpression(IInitBufferExpression)

Visits an expression of type IInitBufferExpression and, recursively, all children elements.

VisitLocalVariable(ILocalVariable)

Visits a local variable definition.

VisitMetadataExpression(IMetadataExpression)

Visits an expression of type IMetadataExpression.

VisitMethodBody(IMethodBody)

Visits a method body and, recursively, all syntax nodes.

VisitMethodCallExpression(IMethodCallExpression)

Visits an expression of type IMethodCallExpression and, recursively, all children elements.

VisitMethodPointerExpression(IMethodPointerExpression)

Visits an expression of type IMethodPointerExpression and, recursively, all children elements.

VisitNewArrayExpression(INewArrayExpression)

Visits an expression of type INewArrayExpression and, recursively, all children elements.

VisitNewObjectExpression(INewObjectExpression)

Visits an expression of type INewObjectExpression and, recursively, all children elements.

VisitParameterExpression(IParameterExpression)

Visits an expression of type IParameterExpression.

VisitStatementExpression(IStatementExpression)

Visits an instruction block and, recursively, all syntax nodes.

VisitSwitchExpression(ISwitchExpression)

Visits an expression of type ISwitchExpression and, recursively, all children elements.

VisitSyntaxElement(IMethodBodyElement)

Visits a syntax element and, recursively, all children elements.

VisitUnaryExpression(IUnaryExpression)

Visits an expression of type IUnaryExpression and, recursively, all children elements.

VisitValueOfExpression(IValueOfExpression)

Visits an expression of type IValueOfExpression and, recursively, all children elements.

VisitVariableExpression(ILocalVariableExpression)

Visits an expression of type ILocalVariableExpression.

VisitZeroaryExpression(IZeroaryExpression)

Visits an expression of type IZeroaryExpression.