PostSharp4.3/API Reference/Post­Sharp.​Reflection.​Syntax Namespace/Syntax­Tree­Visitor Class
SyntaxTreeVisitor Class
Abstract implementation of a visitor of method bodies (ISyntaxMethodBody and IExpression).
Inheritance Hierarchy
System.Object
  PostSharp.Reflection.Syntax.SyntaxTreeVisitor
    PostSharp.Reflection.Syntax.SyntaxTreeFormatter

Namespace: PostSharp.Reflection.Syntax
Assembly: PostSharp (in PostSharp.dll) Version: 4.3.48.0 (4.3.48.0)
Syntax
C#
public abstract class SyntaxTreeVisitor

The SyntaxTreeVisitor type exposes the following members.

Constructors
  NameDescription
Protected methodSyntaxTreeVisitor
Initializes a new instance of the SyntaxTreeVisitor 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 methodVisitExceptionHandler
Visits an exception handler and, recursively, the HandlerBlock and FilterBlock (if any).
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.
Extension Methods
  NameDescription
Public Extension MethodQueryInterface<T>
Gets the implementation of a specified interface for the specified object.
(Defined by QueryInterfaceExtensions.)
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