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