Click or drag to resize

SyntaxNodeExtensions Class



Inheritance Hierarchy
SystemObject
  Microsoft.CodeAnalysisSyntaxNodeExtensions

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

The SyntaxNodeExtensions type exposes the following members.

Methods
  NameDescription
Public methodStatic memberGetCurrentNodeTNode
Gets the node within the subtree corresponding to the original tracked node. Use TrackNodes to start tracking nodes.
Public methodStatic memberGetCurrentNodesTNode(Void, TNode)
Public methodStatic memberInsertNodesAfterTRoot
Public methodStatic memberInsertNodesBeforeTRoot
Public methodStatic memberInsertTokensAfterTRoot
Public methodStatic memberInsertTokensBeforeTRoot
Public methodStatic memberInsertTriviaAfterTRoot
Public methodStatic memberInsertTriviaBeforeTRoot
Public methodStatic memberNormalizeWhitespaceTNode(TNode, String, Boolean)
Creates a new syntax node with all whitespace and end of line trivia replaced with regularly formatted trivia.
Public methodStatic memberNormalizeWhitespaceTNode(TNode, String, String, Boolean)
Creates a new syntax node with all whitespace and end of line trivia replaced with regularly formatted trivia.
Public methodStatic memberRemoveNodeTRoot
Creates a new tree of nodes with the specified node removed.
Public methodStatic memberRemoveNodesTRoot
Public methodStatic memberReplaceNodeTRoot(TRoot, SyntaxNode, SyntaxNode)
Creates a new tree of nodes with the specified old node replaced with a new node.
Public methodStatic memberReplaceNodeTRoot(TRoot, SyntaxNode, IEnumerableT)
Public methodStatic memberReplaceNodesTRoot, TNode
Public methodStatic memberReplaceSyntaxTRoot
Public methodStatic memberReplaceTokenTRoot(TRoot, SyntaxToken, SyntaxToken)
Creates a new tree of nodes with the specified old token replaced with a new token.
Public methodStatic memberReplaceTokenTRoot(TRoot, SyntaxToken, IEnumerableT)
Public methodStatic memberReplaceTokensTRoot
Public methodStatic memberReplaceTriviaTRoot(TRoot, SyntaxTrivia, SyntaxTrivia)
Creates a new tree of nodes with the specified trivia replaced with new trivia.
Public methodStatic memberReplaceTriviaTRoot(TRoot, SyntaxTrivia, IEnumerableT)
Public methodStatic memberReplaceTriviaTRoot(TRoot, IEnumerableT, Void)
Public methodStatic memberTrackNodesTRoot(TRoot, SyntaxNode)
Creates a new tree of nodes with the specified nodes being tracked. Use GetCurrentNode on the subtree resulting from this operation, or any transformation of it, to get the current node corresponding to the original tracked node.
Public methodStatic memberTrackNodesTRoot(TRoot, IEnumerableT)
Public methodStatic memberWithLeadingTriviaTSyntax(TSyntax, SyntaxTrivia)
Creates a new node from this node with the leading trivia replaced.
Public methodStatic memberWithLeadingTriviaTSyntax(TSyntax, SyntaxTriviaList)
Creates a new node from this node with the leading trivia replaced.
Public methodStatic memberWithLeadingTriviaTSyntax(TSyntax, IEnumerableT)
Public methodStatic memberWithoutLeadingTriviaTSyntax
Creates a new node from this node with the leading trivia removed.
Public methodStatic memberWithoutTrailingTriviaTSyntax
Creates a new node from this node with the trailing trivia removed.
Public methodStatic memberWithoutTrivia(SyntaxToken)
Creates a new token from this token without leading or trailing trivia.
Public methodStatic memberWithoutTriviaTSyntax(TSyntax)
Creates a new node from this node without leading or trailing trivia.
Public methodStatic memberWithTrailingTriviaTSyntax(TSyntax, SyntaxTrivia)
Creates a new node from this node with the trailing trivia replaced.
Public methodStatic memberWithTrailingTriviaTSyntax(TSyntax, SyntaxTriviaList)
Creates a new node from this node with the trailing trivia replaced.
Public methodStatic memberWithTrailingTriviaTSyntax(TSyntax, IEnumerableT)
Public methodStatic memberWithTriviaFromTSyntax
Creates a new node from this node with both the leading and trailing trivia of the specified node.
Top
See Also