SyntaxGenerator.ReplaceNode(SyntaxNode, SyntaxNode, SyntaxNode) Method

Definition

Replaces the node in the root's tree with the new node.

public:
 virtual Microsoft::CodeAnalysis::SyntaxNode ^ ReplaceNode(Microsoft::CodeAnalysis::SyntaxNode ^ root, Microsoft::CodeAnalysis::SyntaxNode ^ node, Microsoft::CodeAnalysis::SyntaxNode ^ newDeclaration);
public virtual Microsoft.CodeAnalysis.SyntaxNode ReplaceNode (Microsoft.CodeAnalysis.SyntaxNode root, Microsoft.CodeAnalysis.SyntaxNode node, Microsoft.CodeAnalysis.SyntaxNode newDeclaration);
public virtual Microsoft.CodeAnalysis.SyntaxNode ReplaceNode (Microsoft.CodeAnalysis.SyntaxNode root, Microsoft.CodeAnalysis.SyntaxNode node, Microsoft.CodeAnalysis.SyntaxNode? newDeclaration);
abstract member ReplaceNode : Microsoft.CodeAnalysis.SyntaxNode * Microsoft.CodeAnalysis.SyntaxNode * Microsoft.CodeAnalysis.SyntaxNode -> Microsoft.CodeAnalysis.SyntaxNode
override this.ReplaceNode : Microsoft.CodeAnalysis.SyntaxNode * Microsoft.CodeAnalysis.SyntaxNode * Microsoft.CodeAnalysis.SyntaxNode -> Microsoft.CodeAnalysis.SyntaxNode
Public Overridable Function ReplaceNode (root As SyntaxNode, node As SyntaxNode, newDeclaration As SyntaxNode) As SyntaxNode

Parameters

root
SyntaxNode
node
SyntaxNode
newDeclaration
SyntaxNode

Returns

Applies to