29 references to ReplaceNode
Microsoft.CodeAnalysis.CSharp.Features (2)
ConvertProgram\ConvertProgramTransform_TopLevelStatements.cs (2)
141
root.
ReplaceNode
(namespaceDeclaration, globalStatements));
147
root, root.
ReplaceNode
(typeDeclaration, globalStatements));
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (11)
Syntax\SyntaxNodeTests.cs (10)
2096
var newNode = invocation.
ReplaceNode
(invocation.ArgumentList.Arguments[0], new SyntaxNode[] { argC, argD });
2100
newNode = invocation.
ReplaceNode
(invocation.ArgumentList.Arguments[1], new SyntaxNode[] { argC, argD });
2104
newNode = invocation.
ReplaceNode
(invocation.ArgumentList.Arguments[0], new SyntaxNode[] { });
2108
newNode = invocation.
ReplaceNode
(invocation.ArgumentList.Arguments[1], new SyntaxNode[] { });
2122
Assert.Throws<InvalidOperationException>(() => ifstatement.
ReplaceNode
(then, new[] { stat1, stat2 }));
2125
Assert.Throws<InvalidOperationException>(() => ifstatement.
ReplaceNode
(then, new StatementSyntax[] { }));
2176
var newBlock = block.
ReplaceNode
(block.Statements[0], new[] { stmt1, stmt2 });
2180
newBlock = block.
ReplaceNode
(block.Statements[1], new[] { stmt1, stmt2 });
2184
newBlock = block.
ReplaceNode
(block.Statements[0], new SyntaxNode[] { });
2188
newBlock = block.
ReplaceNode
(block.Statements[1], new SyntaxNode[] { });
Syntax\SyntaxRewriterTests.cs (1)
383
var newRoot = root.
ReplaceNode
(invocation.ArgumentList.Arguments[0], new SyntaxNode[] { argC, argD });
Microsoft.CodeAnalysis.Features (2)
ConvertLinq\AbstractConvertLinqQueryToForEachProvider.cs (1)
88
return root.
ReplaceNode
(Source, Destinations);
ReplaceConditionalWithStatements\AbstractReplaceConditionalWithStatementsCodeRefactoringProvider.cs (1)
268
var newRoot = root.
ReplaceNode
(
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (2)
CodeGen\CodeGenNullable.vb (2)
6681
Dim newRoot = tree1.GetRoot().
ReplaceNode
(invocation, Enumerable.Range(1, newBlocks.Count).
6686
newRoot = newRoot.
ReplaceNode
(oldBlock, newBlocks)
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (11)
Syntax\SyntaxRewriterTests.vb (1)
552
Dim newRoot = root.
ReplaceNode
(invocation.ArgumentList.Arguments(0), New SyntaxNode() {argC, argD})
TestSyntaxNodes.vb (10)
1300
Dim newNode = invocation.
ReplaceNode
(invocation.ArgumentList.Arguments(0), {argC, argD})
1304
newNode = invocation.
ReplaceNode
(invocation.ArgumentList.Arguments(1), {argC, argD})
1308
newNode = invocation.
ReplaceNode
(invocation.ArgumentList.Arguments(0), New SyntaxNode() {})
1312
newNode = invocation.
ReplaceNode
(invocation.ArgumentList.Arguments(1), New SyntaxNode() {})
1324
Assert.Throws(Of InvalidOperationException)(Function() invocation.
ReplaceNode
(expA, {expC, expD}))
1327
Assert.Throws(Of InvalidOperationException)(Function() invocation.
ReplaceNode
(expA, New ExpressionSyntax() {}))
1383
Dim newBlock = ifBlock.
ReplaceNode
(ifBlock.Statements(0), {stmt1, stmt2})
1392
newBlock = ifBlock.
ReplaceNode
(ifBlock.Statements(1), {stmt1, stmt2})
1401
newBlock = ifBlock.
ReplaceNode
(ifBlock.Statements(0), New SyntaxNode() {})
1408
newBlock = ifBlock.
ReplaceNode
(ifBlock.Statements(1), New SyntaxNode() {})
Microsoft.CodeAnalysis.Workspaces (1)
Editing\SyntaxGenerator.cs (1)
1381
return root.
ReplaceNode
(node, newDeclarations);