39 references to ReplaceSyntaxTree
Microsoft.CodeAnalysis.CSharp (1)
Compilation\CSharpCompilation.cs (1)
3956
return this.
ReplaceSyntaxTree
(oldTree, newTree);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Semantics\SyntaxTreeRootTests.cs (1)
64
Assert.Throws<ArgumentException>(() => CSharpCompilation.Create("Bahh", syntaxTrees: new[] { parsedTree }).
ReplaceSyntaxTree
(parsedTree, arbitraryTree));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (37)
Compilation\CompilationAPITests.cs (15)
811
comp = comp.
ReplaceSyntaxTree
(t1, SyntaxFactory.ParseSyntaxTree(s1));
815
comp = comp.AddSyntaxTrees(t1).
ReplaceSyntaxTree
(t1, t1);
822
Assert.Throws<ArgumentException>(() => comp.
ReplaceSyntaxTree
(t1, comp.SyntaxTrees[0]));
920
Assert.Throws<ArgumentException>(() => comp.
ReplaceSyntaxTree
(comp.SyntaxTrees[0], withExpressionRootTree));
957
Assert.Throws<ArgumentException>(() => comp = comp.AddSyntaxTrees(listSyntaxTree).AddReferences().
ReplaceSyntaxTree
(t1, t2));
958
comp = comp.AddSyntaxTrees(t1).AddReferences().
ReplaceSyntaxTree
(t1, t2);
1489
Assert.Throws<ArgumentException>(() => comp.
ReplaceSyntaxTree
(newTree: SyntaxFactory.ParseSyntaxTree("Using System;"), oldTree: t1));
1545
comp = comp.
ReplaceSyntaxTree
(newTree: SyntaxFactory.ParseSyntaxTree("Using System;"), oldTree: t1);
1581
comp = compP.
ReplaceSyntaxTree
(syntaxTree, null);
1588
comp = comp.
ReplaceSyntaxTree
(null, syntaxTree);
1615
comp = comp.
ReplaceSyntaxTree
(t3, t3);
2118
var asc = arc.
ReplaceSyntaxTree
(tr, ts);
2121
var brc = arc.
ReplaceSyntaxTree
(ta, tb);
2124
var abc = arc.
ReplaceSyntaxTree
(tr, tb);
2127
var ars = arc.
ReplaceSyntaxTree
(tc, ts);
Compilation\LoadDirectiveTests.cs (4)
93
compilation = compilation.
ReplaceSyntaxTree
(external1, external3);
105
compilation = compilation.
ReplaceSyntaxTree
(external3, external4);
163
compilation = compilation.
ReplaceSyntaxTree
(compilation.SyntaxTrees.Last(), newTree);
183
compilation = compilation.
ReplaceSyntaxTree
(compilation.SyntaxTrees.Last(), newTree);
Compilation\ReferenceManagerTests.cs (2)
1784
var comp2 = comp1.
ReplaceSyntaxTree
(tree1, tree2);
1827
var comp2 = comp1.
ReplaceSyntaxTree
(tree1, tree2);
DeclarationTests.cs (11)
409
compilation = compilation.
ReplaceSyntaxTree
(firstTree, secondTree);
417
compilation = compilation.
ReplaceSyntaxTree
(secondTree, thirdTree);
462
compilation = compilation.
ReplaceSyntaxTree
(firstTree, secondTree);
505
compilation = compilation.
ReplaceSyntaxTree
(firstTree, secondTree);
561
compilation = compilation.
ReplaceSyntaxTree
(firstTree, secondTree);
616
compilation = compilation.
ReplaceSyntaxTree
(firstTree, secondTree);
662
compilation = compilation.
ReplaceSyntaxTree
(firstTree, secondTree);
705
compilation = compilation.
ReplaceSyntaxTree
(firstTree, secondTree);
752
compilation = compilation.
ReplaceSyntaxTree
(firstTree, secondTree);
797
compilation = compilation.
ReplaceSyntaxTree
(firstTree, secondTree);
842
compilation = compilation.
ReplaceSyntaxTree
(firstTree, secondTree);
Symbols\CompilationCreationTests.cs (2)
2952
var compilation2 = compilation1.
ReplaceSyntaxTree
(tree1, tree3);
2960
var compilation4 = compilation3.
ReplaceSyntaxTree
(tree1, tree3);
Symbols\Metadata\MetadataTypeTests.cs (2)
369
currComp = currComp.
ReplaceSyntaxTree
(oldTree, newTree);
384
currComp = currComp.
ReplaceSyntaxTree
(oldTree, newTree);
Symbols\Source\DeclaringSyntaxNodeTests.cs (1)
751
var comp2 = comp0.
ReplaceSyntaxTree
(source1, source4);