59 references to AddSyntaxTrees
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (1)
RuntimeViewCompiler.cs (1)
378.AddSyntaxTrees(syntaxTree);
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (1)
CompilerFailedExceptionFactoryTest.cs (1)
52compilation = compilation.AddSyntaxTrees(syntaxTree);
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (3)
Emit\EditAndContinue\EditAndContinueTestBase.cs (3)
267return compilation.RemoveAllSyntaxTrees().AddSyntaxTrees(newSource.GetSyntaxTrees(previousParseOptions)); 272return compilation.RemoveAllSyntaxTrees().AddSyntaxTrees(newTree); 277return compilation.RemoveAllSyntaxTrees().AddSyntaxTrees(newTrees);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Semantics\SyntaxTreeRootTests.cs (1)
63Assert.Throws<ArgumentException>(() => CSharpCompilation.CreateScriptCompilation("Wah").AddSyntaxTrees(arbitraryTree));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (31)
Compilation\CompilationAPITests.cs (24)
792comp = comp.AddSyntaxTrees(t1, withErrorTree, withErrorTree1, withErrorTreeVB); 802comp = comp.AddSyntaxTrees(t1); 807comp = comp.AddSyntaxTrees(SyntaxFactory.ParseSyntaxTree(s1)); 815comp = comp.AddSyntaxTrees(t1).ReplaceSyntaxTree(t1, t1); 819Assert.Throws<ArgumentException>(() => comp.AddSyntaxTrees(t1)); 833comp = comp.AddSyntaxTrees(withErrorTree1); 857Assert.Throws<ArgumentException>(() => compCollection = compCollection.AddSyntaxTrees(t4, t5).RemoveSyntaxTrees(col)); 868Assert.Throws<ArgumentException>(() => compCollection = compCollection.AddSyntaxTrees(t4, t6).RemoveSyntaxTrees(stack)); 879Assert.Throws<ArgumentException>(() => compCollection = compCollection.AddSyntaxTrees(t4, t6).RemoveSyntaxTrees(queue)); 897comp = comp.AddSyntaxTrees(withErrorTreeVB); 905comp = comp.AddSyntaxTrees(withWarning); 917Assert.Throws<ArgumentException>(() => comp.AddSyntaxTrees(withExpressionRootTree)); 949comp = comp.AddSyntaxTrees().RemoveSyntaxTrees(listSyntaxTree); 958comp = comp.AddSyntaxTrees(t1).AddReferences().ReplaceSyntaxTree(t1, t2); 971comp1 = comp1.AddReferences(listRef).AddSyntaxTrees(t1).RemoveReferences().RemoveSyntaxTrees(); 1556Assert.Throws<ArgumentException>(() => (comp.AddSyntaxTrees(t1, t1))); 1569comp.AddSyntaxTrees(null); 1580var compP = comp.AddSyntaxTrees(syntaxTree); 1605comp = comp.AddSyntaxTrees(t3); 2087var ab = a.AddSyntaxTrees(tb); 2090var ac = a.AddSyntaxTrees(tc); 2093var ar = a.AddSyntaxTrees(tr); 2096var arc = ar.AddSyntaxTrees(tc); 2208var c3 = c2.AddSyntaxTrees(Parse("public class Main2 { public static int a; }"));
Compilation\LoadDirectiveTests.cs (1)
82compilation = compilation.AddSyntaxTrees(external2);
Compilation\ReferenceManagerTests.cs (1)
1340var c2 = c1.AddSyntaxTrees(Parse("class D { }"));
Symbols\CompilationCreationTests.cs (2)
2900var compilation2 = compilation1.AddSyntaxTrees(treeList2); 2909var compilation4 = compilation3.AddSyntaxTrees(treeList4);
Symbols\ConversionTests.cs (1)
388.AddSyntaxTrees(tree);
Symbols\CovariantReturnTests.cs (1)
451return comp.AddSyntaxTrees(CSharpSyntaxTree.ParseText(assignments, (CSharpParseOptions)comp.SyntaxTrees[0].Options, path: "assignments.cs", encoding: Encoding.UTF8));
Symbols\Source\DeclaringSyntaxNodeTests.cs (1)
746var comp1 = comp0.AddSyntaxTrees(source4);
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (18)
CodeGeneration\SyntaxGeneratorTests.cs (18)
45.AddSyntaxTrees(ParseSyntaxTree(code)); 2205var compilation = _emptyCompilation.AddSyntaxTrees(ParseSyntaxTree(""" 2219var compilation = _emptyCompilation.AddSyntaxTrees(ParseSyntaxTree(""" 2240var compilation = _emptyCompilation.AddSyntaxTrees(ParseSyntaxTree(""" 2261var compilation = _emptyCompilation.AddSyntaxTrees(ParseSyntaxTree(""" 2282var compilation = _emptyCompilation.AddSyntaxTrees(ParseSyntaxTree(""" 2303var compilation = _emptyCompilation.AddSyntaxTrees(ParseSyntaxTree(""" 2325var compilation = _emptyCompilation.AddSyntaxTrees(ParseSyntaxTree(""" 2343var compilation = _emptyCompilation.AddSyntaxTrees(ParseSyntaxTree(""" 2361var compilation = _emptyCompilation.AddSyntaxTrees(ParseSyntaxTree(""" 2389var compilation = _emptyCompilation.AddSyntaxTrees(ParseSyntaxTree(""" 2417var compilation = _emptyCompilation.AddSyntaxTrees(ParseSyntaxTree(""" 2444var compilation = _emptyCompilation.AddSyntaxTrees(ParseSyntaxTree(""" 2476var compilation = _emptyCompilation.AddSyntaxTrees(ParseSyntaxTree(""" 2530var compilation = _emptyCompilation.AddSyntaxTrees(ParseSyntaxTree(""" 2550AddSyntaxTrees(ParseSyntaxTree(""" 2581var compilation = _emptyCompilation.AddSyntaxTrees(ParseSyntaxTree(""" 4000.AddSyntaxTrees(ParseSyntaxTree(src, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.Preview)));
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (1)
Compilation\CompilationAPITests.vb (1)
1393csComp = csComp.AddSyntaxTrees(t1, CS.SyntaxFactory.ParseSyntaxTree("Imports Goo"))
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
UtilityTest\DocumentationCommentIdTests.cs (1)
20return CSharpCompilation.Create("goo.exe").AddReferences(NetFramework.mscorlib).AddSyntaxTrees(syntaxTree);
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
ProjectSystemShim\EntryPointFinderTests.cs (1)
37var compilation = CSharpCompilation.Create("Test", references: [TestBase.MscorlibRef]).AddSyntaxTrees(CSharpSyntaxTree.ParseText($$"""
WinShimmer (1)
Program.cs (1)
50.AddSyntaxTrees(CSharpSyntaxTree.ParseText($@"