23 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)
2107var newNode = invocation.ReplaceNode(invocation.ArgumentList.Arguments[0], new SyntaxNode[] { argC, argD }); 2111newNode = invocation.ReplaceNode(invocation.ArgumentList.Arguments[1], new SyntaxNode[] { argC, argD }); 2115newNode = invocation.ReplaceNode(invocation.ArgumentList.Arguments[0], new SyntaxNode[] { }); 2119newNode = invocation.ReplaceNode(invocation.ArgumentList.Arguments[1], new SyntaxNode[] { }); 2133Assert.Throws<InvalidOperationException>(() => ifstatement.ReplaceNode(then, new[] { stat1, stat2 })); 2136Assert.Throws<InvalidOperationException>(() => ifstatement.ReplaceNode(then, new StatementSyntax[] { })); 2187var newBlock = block.ReplaceNode(block.Statements[0], new[] { stmt1, stmt2 }); 2191newBlock = block.ReplaceNode(block.Statements[1], new[] { stmt1, stmt2 }); 2195newBlock = block.ReplaceNode(block.Statements[0], new SyntaxNode[] { }); 2199newBlock = 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 (1)
ConvertLinq\AbstractConvertLinqQueryToForEachProvider.cs (1)
81return root.ReplaceNode(Source, Destinations);
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (8)
TestSyntaxNodes.vb (8)
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() {}) 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)
1385return root.ReplaceNode(node, newDeclarations);