CSharpSyntaxRewriter Class

Definition

Represents a CSharpSyntaxVisitor<TResult> which descends an entire CSharpSyntaxNode graph and may replace or remove visited SyntaxNodes in depth-first order.

public abstract class CSharpSyntaxRewriter : Microsoft.CodeAnalysis.CSharp.CSharpSyntaxVisitor<Microsoft.CodeAnalysis.SyntaxNode>
Inheritance
System.Object
CSharpSyntaxRewriter

Constructors

CSharpSyntaxRewriter(Boolean)

Properties

VisitIntoStructuredTrivia

Methods

Visit(SyntaxNode)
VisitAccessorDeclaration(AccessorDeclarationSyntax)
VisitAccessorList(AccessorListSyntax)
VisitAliasQualifiedName(AliasQualifiedNameSyntax)
VisitAnonymousMethodExpression(AnonymousMethodExpressionSyntax)
VisitAnonymousObjectCreationExpression(AnonymousObjectCreationExpressionSyntax)
VisitAnonymousObjectMemberDeclarator(AnonymousObjectMemberDeclaratorSyntax)
VisitArgument(ArgumentSyntax)
VisitArgumentList(ArgumentListSyntax)
VisitArrayCreationExpression(ArrayCreationExpressionSyntax)
VisitArrayRankSpecifier(ArrayRankSpecifierSyntax)
VisitArrayType(ArrayTypeSyntax)
VisitArrowExpressionClause(ArrowExpressionClauseSyntax)
VisitAssignmentExpression(AssignmentExpressionSyntax)
VisitAttribute(AttributeSyntax)
VisitAttributeArgument(AttributeArgumentSyntax)
VisitAttributeArgumentList(AttributeArgumentListSyntax)
VisitAttributeList(AttributeListSyntax)
VisitAttributeTargetSpecifier(AttributeTargetSpecifierSyntax)
VisitAwaitExpression(AwaitExpressionSyntax)
VisitBadDirectiveTrivia(BadDirectiveTriviaSyntax)
VisitBaseExpression(BaseExpressionSyntax)
VisitBaseList(BaseListSyntax)
VisitBinaryExpression(BinaryExpressionSyntax)
VisitBlock(BlockSyntax)
VisitBracketedArgumentList(BracketedArgumentListSyntax)
VisitBracketedParameterList(BracketedParameterListSyntax)
VisitBreakStatement(BreakStatementSyntax)
VisitCasePatternSwitchLabel(CasePatternSwitchLabelSyntax)
VisitCaseSwitchLabel(CaseSwitchLabelSyntax)
VisitCastExpression(CastExpressionSyntax)
VisitCatchClause(CatchClauseSyntax)
VisitCatchDeclaration(CatchDeclarationSyntax)
VisitCatchFilterClause(CatchFilterClauseSyntax)
VisitCheckedExpression(CheckedExpressionSyntax)
VisitCheckedStatement(CheckedStatementSyntax)
VisitClassDeclaration(ClassDeclarationSyntax)
VisitClassOrStructConstraint(ClassOrStructConstraintSyntax)
VisitCompilationUnit(CompilationUnitSyntax)
VisitConditionalAccessExpression(ConditionalAccessExpressionSyntax)
VisitConditionalExpression(ConditionalExpressionSyntax)
VisitConstantPattern(ConstantPatternSyntax)
VisitConstructorConstraint(ConstructorConstraintSyntax)
VisitConstructorDeclaration(ConstructorDeclarationSyntax)
VisitConstructorInitializer(ConstructorInitializerSyntax)
VisitContinueStatement(ContinueStatementSyntax)
VisitConversionOperatorDeclaration(ConversionOperatorDeclarationSyntax)
VisitConversionOperatorMemberCref(ConversionOperatorMemberCrefSyntax)
VisitCrefBracketedParameterList(CrefBracketedParameterListSyntax)
VisitCrefParameter(CrefParameterSyntax)
VisitCrefParameterList(CrefParameterListSyntax)
VisitDeclarationExpression(DeclarationExpressionSyntax)
VisitDeclarationPattern(DeclarationPatternSyntax)
VisitDefaultExpression(DefaultExpressionSyntax)
VisitDefaultSwitchLabel(DefaultSwitchLabelSyntax)
VisitDefineDirectiveTrivia(DefineDirectiveTriviaSyntax)
VisitDelegateDeclaration(DelegateDeclarationSyntax)
VisitDestructorDeclaration(DestructorDeclarationSyntax)
VisitDiscardDesignation(DiscardDesignationSyntax)
VisitDocumentationCommentTrivia(DocumentationCommentTriviaSyntax)
VisitDoStatement(DoStatementSyntax)
VisitElementAccessExpression(ElementAccessExpressionSyntax)
VisitElementBindingExpression(ElementBindingExpressionSyntax)
VisitElifDirectiveTrivia(ElifDirectiveTriviaSyntax)
VisitElseClause(ElseClauseSyntax)
VisitElseDirectiveTrivia(ElseDirectiveTriviaSyntax)
VisitEmptyStatement(EmptyStatementSyntax)
VisitEndIfDirectiveTrivia(EndIfDirectiveTriviaSyntax)
VisitEndRegionDirectiveTrivia(EndRegionDirectiveTriviaSyntax)
VisitEnumDeclaration(EnumDeclarationSyntax)
VisitEnumMemberDeclaration(EnumMemberDeclarationSyntax)
VisitEqualsValueClause(EqualsValueClauseSyntax)
VisitErrorDirectiveTrivia(ErrorDirectiveTriviaSyntax)
VisitEventDeclaration(EventDeclarationSyntax)
VisitEventFieldDeclaration(EventFieldDeclarationSyntax)
VisitExplicitInterfaceSpecifier(ExplicitInterfaceSpecifierSyntax)
VisitExpressionStatement(ExpressionStatementSyntax)
VisitExternAliasDirective(ExternAliasDirectiveSyntax)
VisitFieldDeclaration(FieldDeclarationSyntax)
VisitFinallyClause(FinallyClauseSyntax)
VisitFixedStatement(FixedStatementSyntax)
VisitForEachStatement(ForEachStatementSyntax)
VisitForEachVariableStatement(ForEachVariableStatementSyntax)
VisitForStatement(ForStatementSyntax)
VisitFromClause(FromClauseSyntax)
VisitGenericName(GenericNameSyntax)
VisitGlobalStatement(GlobalStatementSyntax)
VisitGotoStatement(GotoStatementSyntax)
VisitGroupClause(GroupClauseSyntax)
VisitIdentifierName(IdentifierNameSyntax)
VisitIfDirectiveTrivia(IfDirectiveTriviaSyntax)
VisitIfStatement(IfStatementSyntax)
VisitImplicitArrayCreationExpression(ImplicitArrayCreationExpressionSyntax)
VisitImplicitElementAccess(ImplicitElementAccessSyntax)
VisitIncompleteMember(IncompleteMemberSyntax)
VisitIndexerDeclaration(IndexerDeclarationSyntax)
VisitIndexerMemberCref(IndexerMemberCrefSyntax)
VisitInitializerExpression(InitializerExpressionSyntax)
VisitInterfaceDeclaration(InterfaceDeclarationSyntax)
VisitInterpolatedStringExpression(InterpolatedStringExpressionSyntax)
VisitInterpolatedStringText(InterpolatedStringTextSyntax)
VisitInterpolation(InterpolationSyntax)
VisitInterpolationAlignmentClause(InterpolationAlignmentClauseSyntax)
VisitInterpolationFormatClause(InterpolationFormatClauseSyntax)
VisitInvocationExpression(InvocationExpressionSyntax)
VisitIsPatternExpression(IsPatternExpressionSyntax)
VisitJoinClause(JoinClauseSyntax)
VisitJoinIntoClause(JoinIntoClauseSyntax)
VisitLabeledStatement(LabeledStatementSyntax)
VisitLetClause(LetClauseSyntax)
VisitLineDirectiveTrivia(LineDirectiveTriviaSyntax)
VisitList(SyntaxTokenList)
VisitList(SyntaxTriviaList)
VisitList<TNode>(SeparatedSyntaxList<TNode>)
VisitList<TNode>(SyntaxList<TNode>)
VisitListElement(SyntaxTrivia)
VisitListElement<TNode>(TNode)
VisitListSeparator(SyntaxToken)
VisitLiteralExpression(LiteralExpressionSyntax)
VisitLoadDirectiveTrivia(LoadDirectiveTriviaSyntax)
VisitLocalDeclarationStatement(LocalDeclarationStatementSyntax)
VisitLocalFunctionStatement(LocalFunctionStatementSyntax)
VisitLockStatement(LockStatementSyntax)
VisitMakeRefExpression(MakeRefExpressionSyntax)
VisitMemberAccessExpression(MemberAccessExpressionSyntax)
VisitMemberBindingExpression(MemberBindingExpressionSyntax)
VisitMethodDeclaration(MethodDeclarationSyntax)
VisitNameColon(NameColonSyntax)
VisitNameEquals(NameEqualsSyntax)
VisitNameMemberCref(NameMemberCrefSyntax)
VisitNamespaceDeclaration(NamespaceDeclarationSyntax)
VisitNullableType(NullableTypeSyntax)
VisitObjectCreationExpression(ObjectCreationExpressionSyntax)
VisitOmittedArraySizeExpression(OmittedArraySizeExpressionSyntax)
VisitOmittedTypeArgument(OmittedTypeArgumentSyntax)
VisitOperatorDeclaration(OperatorDeclarationSyntax)
VisitOperatorMemberCref(OperatorMemberCrefSyntax)
VisitOrderByClause(OrderByClauseSyntax)
VisitOrdering(OrderingSyntax)
VisitParameter(ParameterSyntax)
VisitParameterList(ParameterListSyntax)
VisitParenthesizedExpression(ParenthesizedExpressionSyntax)
VisitParenthesizedLambdaExpression(ParenthesizedLambdaExpressionSyntax)
VisitParenthesizedVariableDesignation(ParenthesizedVariableDesignationSyntax)
VisitPointerType(PointerTypeSyntax)
VisitPostfixUnaryExpression(PostfixUnaryExpressionSyntax)
VisitPragmaChecksumDirectiveTrivia(PragmaChecksumDirectiveTriviaSyntax)
VisitPragmaWarningDirectiveTrivia(PragmaWarningDirectiveTriviaSyntax)
VisitPredefinedType(PredefinedTypeSyntax)
VisitPrefixUnaryExpression(PrefixUnaryExpressionSyntax)
VisitPropertyDeclaration(PropertyDeclarationSyntax)
VisitQualifiedCref(QualifiedCrefSyntax)
VisitQualifiedName(QualifiedNameSyntax)
VisitQueryBody(QueryBodySyntax)
VisitQueryContinuation(QueryContinuationSyntax)
VisitQueryExpression(QueryExpressionSyntax)
VisitReferenceDirectiveTrivia(ReferenceDirectiveTriviaSyntax)
VisitRefExpression(RefExpressionSyntax)
VisitRefType(RefTypeSyntax)
VisitRefTypeExpression(RefTypeExpressionSyntax)
VisitRefValueExpression(RefValueExpressionSyntax)
VisitRegionDirectiveTrivia(RegionDirectiveTriviaSyntax)
VisitReturnStatement(ReturnStatementSyntax)
VisitSelectClause(SelectClauseSyntax)
VisitShebangDirectiveTrivia(ShebangDirectiveTriviaSyntax)
VisitSimpleBaseType(SimpleBaseTypeSyntax)
VisitSimpleLambdaExpression(SimpleLambdaExpressionSyntax)
VisitSingleVariableDesignation(SingleVariableDesignationSyntax)
VisitSizeOfExpression(SizeOfExpressionSyntax)
VisitSkippedTokensTrivia(SkippedTokensTriviaSyntax)
VisitStackAllocArrayCreationExpression(StackAllocArrayCreationExpressionSyntax)
VisitStructDeclaration(StructDeclarationSyntax)
VisitSwitchSection(SwitchSectionSyntax)
VisitSwitchStatement(SwitchStatementSyntax)
VisitThisExpression(ThisExpressionSyntax)
VisitThrowExpression(ThrowExpressionSyntax)
VisitThrowStatement(ThrowStatementSyntax)
VisitToken(SyntaxToken)
VisitTrivia(SyntaxTrivia)
VisitTryStatement(TryStatementSyntax)
VisitTupleElement(TupleElementSyntax)
VisitTupleExpression(TupleExpressionSyntax)
VisitTupleType(TupleTypeSyntax)
VisitTypeArgumentList(TypeArgumentListSyntax)
VisitTypeConstraint(TypeConstraintSyntax)
VisitTypeCref(TypeCrefSyntax)
VisitTypeOfExpression(TypeOfExpressionSyntax)
VisitTypeParameter(TypeParameterSyntax)
VisitTypeParameterConstraintClause(TypeParameterConstraintClauseSyntax)
VisitTypeParameterList(TypeParameterListSyntax)
VisitUndefDirectiveTrivia(UndefDirectiveTriviaSyntax)
VisitUnsafeStatement(UnsafeStatementSyntax)
VisitUsingDirective(UsingDirectiveSyntax)
VisitUsingStatement(UsingStatementSyntax)
VisitVariableDeclaration(VariableDeclarationSyntax)
VisitVariableDeclarator(VariableDeclaratorSyntax)
VisitWarningDirectiveTrivia(WarningDirectiveTriviaSyntax)
VisitWhenClause(WhenClauseSyntax)
VisitWhereClause(WhereClauseSyntax)
VisitWhileStatement(WhileStatementSyntax)
VisitXmlCDataSection(XmlCDataSectionSyntax)
VisitXmlComment(XmlCommentSyntax)
VisitXmlCrefAttribute(XmlCrefAttributeSyntax)
VisitXmlElement(XmlElementSyntax)
VisitXmlElementEndTag(XmlElementEndTagSyntax)
VisitXmlElementStartTag(XmlElementStartTagSyntax)
VisitXmlEmptyElement(XmlEmptyElementSyntax)
VisitXmlName(XmlNameSyntax)
VisitXmlNameAttribute(XmlNameAttributeSyntax)
VisitXmlPrefix(XmlPrefixSyntax)
VisitXmlProcessingInstruction(XmlProcessingInstructionSyntax)
VisitXmlText(XmlTextSyntax)
VisitXmlTextAttribute(XmlTextAttributeSyntax)
VisitYieldStatement(YieldStatementSyntax)
DefaultVisit(SyntaxNode) Inherited from CSharpSyntaxVisitor<TResult>

Applies to