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