Click or drag to resize

CSharpSyntaxVisitorTResult Class



Represents a CSharpSyntaxNode visitor that visits only the single CSharpSyntaxNode passed into its Visit method and produces a value of the type specified by the TResult parameter.
Inheritance Hierarchy
SystemObject
  Microsoft.CodeAnalysis.CSharpCSharpSyntaxVisitorTResult
    Microsoft.CodeAnalysis.CSharpCSharpSyntaxRewriter

Namespace:  Microsoft.CodeAnalysis.CSharp
Assembly:  Microsoft.CodeAnalysis.CSharp (in Microsoft.CodeAnalysis.CSharp.dll) Version: 2.3.0-dev-56735-00. Commit Hash: <developer build>
Syntax
public abstract class CSharpSyntaxVisitor<TResult>

Type Parameters

TResult
The type of the return value this visitor's Visit method.

The CSharpSyntaxVisitorTResult type exposes the following members.

Constructors
  NameDescription
Protected methodCSharpSyntaxVisitorTResult
Initializes a new instance of the CSharpSyntaxVisitorTResult class
Top
Methods
  NameDescription
Public methodDefaultVisit
Public methodVisit
Public methodVisitAccessorDeclaration
Called when the visitor visits a AccessorDeclarationSyntax node.
Public methodVisitAccessorList
Called when the visitor visits a AccessorListSyntax node.
Public methodVisitAliasQualifiedName
Called when the visitor visits a AliasQualifiedNameSyntax node.
Public methodVisitAnonymousMethodExpression
Called when the visitor visits a AnonymousMethodExpressionSyntax node.
Public methodVisitAnonymousObjectCreationExpression
Called when the visitor visits a AnonymousObjectCreationExpressionSyntax node.
Public methodVisitAnonymousObjectMemberDeclarator
Called when the visitor visits a AnonymousObjectMemberDeclaratorSyntax node.
Public methodVisitArgument
Called when the visitor visits a ArgumentSyntax node.
Public methodVisitArgumentList
Called when the visitor visits a ArgumentListSyntax node.
Public methodVisitArrayCreationExpression
Called when the visitor visits a ArrayCreationExpressionSyntax node.
Public methodVisitArrayRankSpecifier
Called when the visitor visits a ArrayRankSpecifierSyntax node.
Public methodVisitArrayType
Called when the visitor visits a ArrayTypeSyntax node.
Public methodVisitArrowExpressionClause
Called when the visitor visits a ArrowExpressionClauseSyntax node.
Public methodVisitAssignmentExpression
Called when the visitor visits a AssignmentExpressionSyntax node.
Public methodVisitAttribute
Called when the visitor visits a AttributeSyntax node.
Public methodVisitAttributeArgument
Called when the visitor visits a AttributeArgumentSyntax node.
Public methodVisitAttributeArgumentList
Called when the visitor visits a AttributeArgumentListSyntax node.
Public methodVisitAttributeList
Called when the visitor visits a AttributeListSyntax node.
Public methodVisitAttributeTargetSpecifier
Called when the visitor visits a AttributeTargetSpecifierSyntax node.
Public methodVisitAwaitExpression
Called when the visitor visits a AwaitExpressionSyntax node.
Public methodVisitBadDirectiveTrivia
Called when the visitor visits a BadDirectiveTriviaSyntax node.
Public methodVisitBaseExpression
Called when the visitor visits a BaseExpressionSyntax node.
Public methodVisitBaseList
Called when the visitor visits a BaseListSyntax node.
Public methodVisitBinaryExpression
Called when the visitor visits a BinaryExpressionSyntax node.
Public methodVisitBlock
Called when the visitor visits a BlockSyntax node.
Public methodVisitBracketedArgumentList
Called when the visitor visits a BracketedArgumentListSyntax node.
Public methodVisitBracketedParameterList
Called when the visitor visits a BracketedParameterListSyntax node.
Public methodVisitBreakStatement
Called when the visitor visits a BreakStatementSyntax node.
Public methodVisitCasePatternSwitchLabel
Called when the visitor visits a CasePatternSwitchLabelSyntax node.
Public methodVisitCaseSwitchLabel
Called when the visitor visits a CaseSwitchLabelSyntax node.
Public methodVisitCastExpression
Called when the visitor visits a CastExpressionSyntax node.
Public methodVisitCatchClause
Called when the visitor visits a CatchClauseSyntax node.
Public methodVisitCatchDeclaration
Called when the visitor visits a CatchDeclarationSyntax node.
Public methodVisitCatchFilterClause
Called when the visitor visits a CatchFilterClauseSyntax node.
Public methodVisitCheckedExpression
Called when the visitor visits a CheckedExpressionSyntax node.
Public methodVisitCheckedStatement
Called when the visitor visits a CheckedStatementSyntax node.
Public methodVisitClassDeclaration
Called when the visitor visits a ClassDeclarationSyntax node.
Public methodVisitClassOrStructConstraint
Called when the visitor visits a ClassOrStructConstraintSyntax node.
Public methodVisitCompilationUnit
Called when the visitor visits a CompilationUnitSyntax node.
Public methodVisitConditionalAccessExpression
Called when the visitor visits a ConditionalAccessExpressionSyntax node.
Public methodVisitConditionalExpression
Called when the visitor visits a ConditionalExpressionSyntax node.
Public methodVisitConstantPattern
Called when the visitor visits a ConstantPatternSyntax node.
Public methodVisitConstructorConstraint
Called when the visitor visits a ConstructorConstraintSyntax node.
Public methodVisitConstructorDeclaration
Called when the visitor visits a ConstructorDeclarationSyntax node.
Public methodVisitConstructorInitializer
Called when the visitor visits a ConstructorInitializerSyntax node.
Public methodVisitContinueStatement
Called when the visitor visits a ContinueStatementSyntax node.
Public methodVisitConversionOperatorDeclaration
Called when the visitor visits a ConversionOperatorDeclarationSyntax node.
Public methodVisitConversionOperatorMemberCref
Called when the visitor visits a ConversionOperatorMemberCrefSyntax node.
Public methodVisitCrefBracketedParameterList
Called when the visitor visits a CrefBracketedParameterListSyntax node.
Public methodVisitCrefParameter
Called when the visitor visits a CrefParameterSyntax node.
Public methodVisitCrefParameterList
Called when the visitor visits a CrefParameterListSyntax node.
Public methodVisitDeclarationExpression
Called when the visitor visits a DeclarationExpressionSyntax node.
Public methodVisitDeclarationPattern
Called when the visitor visits a DeclarationPatternSyntax node.
Public methodVisitDefaultExpression
Called when the visitor visits a DefaultExpressionSyntax node.
Public methodVisitDefaultSwitchLabel
Called when the visitor visits a DefaultSwitchLabelSyntax node.
Public methodVisitDefineDirectiveTrivia
Called when the visitor visits a DefineDirectiveTriviaSyntax node.
Public methodVisitDelegateDeclaration
Called when the visitor visits a DelegateDeclarationSyntax node.
Public methodVisitDestructorDeclaration
Called when the visitor visits a DestructorDeclarationSyntax node.
Public methodVisitDiscardDesignation
Called when the visitor visits a DiscardDesignationSyntax node.
Public methodVisitDocumentationCommentTrivia
Called when the visitor visits a DocumentationCommentTriviaSyntax node.
Public methodVisitDoStatement
Called when the visitor visits a DoStatementSyntax node.
Public methodVisitElementAccessExpression
Called when the visitor visits a ElementAccessExpressionSyntax node.
Public methodVisitElementBindingExpression
Called when the visitor visits a ElementBindingExpressionSyntax node.
Public methodVisitElifDirectiveTrivia
Called when the visitor visits a ElifDirectiveTriviaSyntax node.
Public methodVisitElseClause
Called when the visitor visits a ElseClauseSyntax node.
Public methodVisitElseDirectiveTrivia
Called when the visitor visits a ElseDirectiveTriviaSyntax node.
Public methodVisitEmptyStatement
Called when the visitor visits a EmptyStatementSyntax node.
Public methodVisitEndIfDirectiveTrivia
Called when the visitor visits a EndIfDirectiveTriviaSyntax node.
Public methodVisitEndRegionDirectiveTrivia
Called when the visitor visits a EndRegionDirectiveTriviaSyntax node.
Public methodVisitEnumDeclaration
Called when the visitor visits a EnumDeclarationSyntax node.
Public methodVisitEnumMemberDeclaration
Called when the visitor visits a EnumMemberDeclarationSyntax node.
Public methodVisitEqualsValueClause
Called when the visitor visits a EqualsValueClauseSyntax node.
Public methodVisitErrorDirectiveTrivia
Called when the visitor visits a ErrorDirectiveTriviaSyntax node.
Public methodVisitEventDeclaration
Called when the visitor visits a EventDeclarationSyntax node.
Public methodVisitEventFieldDeclaration
Called when the visitor visits a EventFieldDeclarationSyntax node.
Public methodVisitExplicitInterfaceSpecifier
Called when the visitor visits a ExplicitInterfaceSpecifierSyntax node.
Public methodVisitExpressionStatement
Called when the visitor visits a ExpressionStatementSyntax node.
Public methodVisitExternAliasDirective
Called when the visitor visits a ExternAliasDirectiveSyntax node.
Public methodVisitFieldDeclaration
Called when the visitor visits a FieldDeclarationSyntax node.
Public methodVisitFinallyClause
Called when the visitor visits a FinallyClauseSyntax node.
Public methodVisitFixedStatement
Called when the visitor visits a FixedStatementSyntax node.
Public methodVisitForEachStatement
Called when the visitor visits a ForEachStatementSyntax node.
Public methodVisitForEachVariableStatement
Called when the visitor visits a ForEachVariableStatementSyntax node.
Public methodVisitForStatement
Called when the visitor visits a ForStatementSyntax node.
Public methodVisitFromClause
Called when the visitor visits a FromClauseSyntax node.
Public methodVisitGenericName
Called when the visitor visits a GenericNameSyntax node.
Public methodVisitGlobalStatement
Called when the visitor visits a GlobalStatementSyntax node.
Public methodVisitGotoStatement
Called when the visitor visits a GotoStatementSyntax node.
Public methodVisitGroupClause
Called when the visitor visits a GroupClauseSyntax node.
Public methodVisitIdentifierName
Called when the visitor visits a IdentifierNameSyntax node.
Public methodVisitIfDirectiveTrivia
Called when the visitor visits a IfDirectiveTriviaSyntax node.
Public methodVisitIfStatement
Called when the visitor visits a IfStatementSyntax node.
Public methodVisitImplicitArrayCreationExpression
Called when the visitor visits a ImplicitArrayCreationExpressionSyntax node.
Public methodVisitImplicitElementAccess
Called when the visitor visits a ImplicitElementAccessSyntax node.
Public methodVisitIncompleteMember
Called when the visitor visits a IncompleteMemberSyntax node.
Public methodVisitIndexerDeclaration
Called when the visitor visits a IndexerDeclarationSyntax node.
Public methodVisitIndexerMemberCref
Called when the visitor visits a IndexerMemberCrefSyntax node.
Public methodVisitInitializerExpression
Called when the visitor visits a InitializerExpressionSyntax node.
Public methodVisitInterfaceDeclaration
Called when the visitor visits a InterfaceDeclarationSyntax node.
Public methodVisitInterpolatedStringExpression
Called when the visitor visits a InterpolatedStringExpressionSyntax node.
Public methodVisitInterpolatedStringText
Called when the visitor visits a InterpolatedStringTextSyntax node.
Public methodVisitInterpolation
Called when the visitor visits a InterpolationSyntax node.
Public methodVisitInterpolationAlignmentClause
Called when the visitor visits a InterpolationAlignmentClauseSyntax node.
Public methodVisitInterpolationFormatClause
Called when the visitor visits a InterpolationFormatClauseSyntax node.
Public methodVisitInvocationExpression
Called when the visitor visits a InvocationExpressionSyntax node.
Public methodVisitIsPatternExpression
Called when the visitor visits a IsPatternExpressionSyntax node.
Public methodVisitJoinClause
Called when the visitor visits a JoinClauseSyntax node.
Public methodVisitJoinIntoClause
Called when the visitor visits a JoinIntoClauseSyntax node.
Public methodVisitLabeledStatement
Called when the visitor visits a LabeledStatementSyntax node.
Public methodVisitLetClause
Called when the visitor visits a LetClauseSyntax node.
Public methodVisitLineDirectiveTrivia
Called when the visitor visits a LineDirectiveTriviaSyntax node.
Public methodVisitLiteralExpression
Called when the visitor visits a LiteralExpressionSyntax node.
Public methodVisitLoadDirectiveTrivia
Called when the visitor visits a LoadDirectiveTriviaSyntax node.
Public methodVisitLocalDeclarationStatement
Called when the visitor visits a LocalDeclarationStatementSyntax node.
Public methodVisitLocalFunctionStatement
Called when the visitor visits a LocalFunctionStatementSyntax node.
Public methodVisitLockStatement
Called when the visitor visits a LockStatementSyntax node.
Public methodVisitMakeRefExpression
Called when the visitor visits a MakeRefExpressionSyntax node.
Public methodVisitMemberAccessExpression
Called when the visitor visits a MemberAccessExpressionSyntax node.
Public methodVisitMemberBindingExpression
Called when the visitor visits a MemberBindingExpressionSyntax node.
Public methodVisitMethodDeclaration
Called when the visitor visits a MethodDeclarationSyntax node.
Public methodVisitNameColon
Called when the visitor visits a NameColonSyntax node.
Public methodVisitNameEquals
Called when the visitor visits a NameEqualsSyntax node.
Public methodVisitNameMemberCref
Called when the visitor visits a NameMemberCrefSyntax node.
Public methodVisitNamespaceDeclaration
Called when the visitor visits a NamespaceDeclarationSyntax node.
Public methodVisitNullableType
Called when the visitor visits a NullableTypeSyntax node.
Public methodVisitObjectCreationExpression
Called when the visitor visits a ObjectCreationExpressionSyntax node.
Public methodVisitOmittedArraySizeExpression
Called when the visitor visits a OmittedArraySizeExpressionSyntax node.
Public methodVisitOmittedTypeArgument
Called when the visitor visits a OmittedTypeArgumentSyntax node.
Public methodVisitOperatorDeclaration
Called when the visitor visits a OperatorDeclarationSyntax node.
Public methodVisitOperatorMemberCref
Called when the visitor visits a OperatorMemberCrefSyntax node.
Public methodVisitOrderByClause
Called when the visitor visits a OrderByClauseSyntax node.
Public methodVisitOrdering
Called when the visitor visits a OrderingSyntax node.
Public methodVisitParameter
Called when the visitor visits a ParameterSyntax node.
Public methodVisitParameterList
Called when the visitor visits a ParameterListSyntax node.
Public methodVisitParenthesizedExpression
Called when the visitor visits a ParenthesizedExpressionSyntax node.
Public methodVisitParenthesizedLambdaExpression
Called when the visitor visits a ParenthesizedLambdaExpressionSyntax node.
Public methodVisitParenthesizedVariableDesignation
Called when the visitor visits a ParenthesizedVariableDesignationSyntax node.
Public methodVisitPointerType
Called when the visitor visits a PointerTypeSyntax node.
Public methodVisitPostfixUnaryExpression
Called when the visitor visits a PostfixUnaryExpressionSyntax node.
Public methodVisitPragmaChecksumDirectiveTrivia
Called when the visitor visits a PragmaChecksumDirectiveTriviaSyntax node.
Public methodVisitPragmaWarningDirectiveTrivia
Called when the visitor visits a PragmaWarningDirectiveTriviaSyntax node.
Public methodVisitPredefinedType
Called when the visitor visits a PredefinedTypeSyntax node.
Public methodVisitPrefixUnaryExpression
Called when the visitor visits a PrefixUnaryExpressionSyntax node.
Public methodVisitPropertyDeclaration
Called when the visitor visits a PropertyDeclarationSyntax node.
Public methodVisitQualifiedCref
Called when the visitor visits a QualifiedCrefSyntax node.
Public methodVisitQualifiedName
Called when the visitor visits a QualifiedNameSyntax node.
Public methodVisitQueryBody
Called when the visitor visits a QueryBodySyntax node.
Public methodVisitQueryContinuation
Called when the visitor visits a QueryContinuationSyntax node.
Public methodVisitQueryExpression
Called when the visitor visits a QueryExpressionSyntax node.
Public methodVisitReferenceDirectiveTrivia
Called when the visitor visits a ReferenceDirectiveTriviaSyntax node.
Public methodVisitRefExpression
Called when the visitor visits a RefExpressionSyntax node.
Public methodVisitRefType
Called when the visitor visits a RefTypeSyntax node.
Public methodVisitRefTypeExpression
Called when the visitor visits a RefTypeExpressionSyntax node.
Public methodVisitRefValueExpression
Called when the visitor visits a RefValueExpressionSyntax node.
Public methodVisitRegionDirectiveTrivia
Called when the visitor visits a RegionDirectiveTriviaSyntax node.
Public methodVisitReturnStatement
Called when the visitor visits a ReturnStatementSyntax node.
Public methodVisitSelectClause
Called when the visitor visits a SelectClauseSyntax node.
Public methodVisitShebangDirectiveTrivia
Called when the visitor visits a ShebangDirectiveTriviaSyntax node.
Public methodVisitSimpleBaseType
Called when the visitor visits a SimpleBaseTypeSyntax node.
Public methodVisitSimpleLambdaExpression
Called when the visitor visits a SimpleLambdaExpressionSyntax node.
Public methodVisitSingleVariableDesignation
Called when the visitor visits a SingleVariableDesignationSyntax node.
Public methodVisitSizeOfExpression
Called when the visitor visits a SizeOfExpressionSyntax node.
Public methodVisitSkippedTokensTrivia
Called when the visitor visits a SkippedTokensTriviaSyntax node.
Public methodVisitStackAllocArrayCreationExpression
Called when the visitor visits a StackAllocArrayCreationExpressionSyntax node.
Public methodVisitStructDeclaration
Called when the visitor visits a StructDeclarationSyntax node.
Public methodVisitSwitchSection
Called when the visitor visits a SwitchSectionSyntax node.
Public methodVisitSwitchStatement
Called when the visitor visits a SwitchStatementSyntax node.
Public methodVisitThisExpression
Called when the visitor visits a ThisExpressionSyntax node.
Public methodVisitThrowExpression
Called when the visitor visits a ThrowExpressionSyntax node.
Public methodVisitThrowStatement
Called when the visitor visits a ThrowStatementSyntax node.
Public methodVisitTryStatement
Called when the visitor visits a TryStatementSyntax node.
Public methodVisitTupleElement
Called when the visitor visits a TupleElementSyntax node.
Public methodVisitTupleExpression
Called when the visitor visits a TupleExpressionSyntax node.
Public methodVisitTupleType
Called when the visitor visits a TupleTypeSyntax node.
Public methodVisitTypeArgumentList
Called when the visitor visits a TypeArgumentListSyntax node.
Public methodVisitTypeConstraint
Called when the visitor visits a TypeConstraintSyntax node.
Public methodVisitTypeCref
Called when the visitor visits a TypeCrefSyntax node.
Public methodVisitTypeOfExpression
Called when the visitor visits a TypeOfExpressionSyntax node.
Public methodVisitTypeParameter
Called when the visitor visits a TypeParameterSyntax node.
Public methodVisitTypeParameterConstraintClause
Called when the visitor visits a TypeParameterConstraintClauseSyntax node.
Public methodVisitTypeParameterList
Called when the visitor visits a TypeParameterListSyntax node.
Public methodVisitUndefDirectiveTrivia
Called when the visitor visits a UndefDirectiveTriviaSyntax node.
Public methodVisitUnsafeStatement
Called when the visitor visits a UnsafeStatementSyntax node.
Public methodVisitUsingDirective
Called when the visitor visits a UsingDirectiveSyntax node.
Public methodVisitUsingStatement
Called when the visitor visits a UsingStatementSyntax node.
Public methodVisitVariableDeclaration
Called when the visitor visits a VariableDeclarationSyntax node.
Public methodVisitVariableDeclarator
Called when the visitor visits a VariableDeclaratorSyntax node.
Public methodVisitWarningDirectiveTrivia
Called when the visitor visits a WarningDirectiveTriviaSyntax node.
Public methodVisitWhenClause
Called when the visitor visits a WhenClauseSyntax node.
Public methodVisitWhereClause
Called when the visitor visits a WhereClauseSyntax node.
Public methodVisitWhileStatement
Called when the visitor visits a WhileStatementSyntax node.
Public methodVisitXmlCDataSection
Called when the visitor visits a XmlCDataSectionSyntax node.
Public methodVisitXmlComment
Called when the visitor visits a XmlCommentSyntax node.
Public methodVisitXmlCrefAttribute
Called when the visitor visits a XmlCrefAttributeSyntax node.
Public methodVisitXmlElement
Called when the visitor visits a XmlElementSyntax node.
Public methodVisitXmlElementEndTag
Called when the visitor visits a XmlElementEndTagSyntax node.
Public methodVisitXmlElementStartTag
Called when the visitor visits a XmlElementStartTagSyntax node.
Public methodVisitXmlEmptyElement
Called when the visitor visits a XmlEmptyElementSyntax node.
Public methodVisitXmlName
Called when the visitor visits a XmlNameSyntax node.
Public methodVisitXmlNameAttribute
Called when the visitor visits a XmlNameAttributeSyntax node.
Public methodVisitXmlPrefix
Called when the visitor visits a XmlPrefixSyntax node.
Public methodVisitXmlProcessingInstruction
Called when the visitor visits a XmlProcessingInstructionSyntax node.
Public methodVisitXmlText
Called when the visitor visits a XmlTextSyntax node.
Public methodVisitXmlTextAttribute
Called when the visitor visits a XmlTextAttributeSyntax node.
Public methodVisitYieldStatement
Called when the visitor visits a YieldStatementSyntax node.
Top
See Also