24 references to ContainsSyntaxTree
Microsoft.CodeAnalysis (7)
Compilation\Compilation.cs (2)
3544Debug.Assert(this.ContainsSyntaxTree(tree1)); 3545Debug.Assert(this.ContainsSyntaxTree(tree2));
DiagnosticAnalyzer\AnalyzerDriver.cs (1)
1007Debug.Assert(compilation.ContainsSyntaxTree(tree));
DiagnosticAnalyzer\CompilationUnitCompletedEvent.cs (1)
16Debug.Assert(compilation.ContainsSyntaxTree(compilationUnit));
DiagnosticAnalyzer\CompilationWithAnalyzers.cs (2)
193if (!_compilation.ContainsSyntaxTree(model.SyntaxTree)) 206if (!_compilation.ContainsSyntaxTree(tree))
DiagnosticAnalyzer\DiagnosticAnalysisContextHelpers.cs (1)
96if (!compilation.ContainsSyntaxTree(location.SourceTree))
Microsoft.CodeAnalysis.Workspaces (2)
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker.cs (2)
964ThrowExceptionIfFalse(compilation.ContainsSyntaxTree(tree), "The tree in the ProjectState should have been in the compilation."); 973ThrowExceptionIfFalse(compilation.ContainsSyntaxTree(tree), "The tree for the generated document should have been in the compilation.");
Microsoft.CodeAnalysis.Workspaces.UnitTests (12)
SolutionTests\SolutionTests.cs (12)
4156Assert.True(frozenCompilation.ContainsSyntaxTree(await frozenDocument.GetSyntaxTreeAsync())); 4157Assert.True(frozenCompilation.ContainsSyntaxTree(await originalProject.Documents.Single().GetSyntaxTreeAsync())); 4184Assert.True(frozenCompilation.ContainsSyntaxTree(await frozenDocument.GetSyntaxTreeAsync())); 4185Assert.True(frozenCompilation.ContainsSyntaxTree(await originalProject.Documents.Single().GetSyntaxTreeAsync())); 4598Assert.True(finalCompilation.ContainsSyntaxTree(syntaxTreeAfterRemovingEditorConfig)); 4644Assert.True(finalCompilation.ContainsSyntaxTree(syntaxTreeAfterEditorConfigChange)); 5463Assert.True(frozenCompilation.ContainsSyntaxTree(await frozenProject.Documents.Single().GetSyntaxTreeAsync())); 5488Assert.True(frozenCompilation1.ContainsSyntaxTree(await frozenProject1.Documents.Single().GetSyntaxTreeAsync())); 5515Assert.True(frozenCompilation1.ContainsSyntaxTree(await frozenProject1.Documents.Single().GetSyntaxTreeAsync())); 5545Assert.True(frozenCompilation1.ContainsSyntaxTree(await frozenProject1.Documents.Single().GetSyntaxTreeAsync())); 5552Assert.True(frozenCompilation2.ContainsSyntaxTree(await frozenProject2.Documents.Single().GetSyntaxTreeAsync())); 5579Assert.True(forkedCompilation1.ContainsSyntaxTree(forkedSyntaxTree1));
Microsoft.Extensions.Options.SourceGeneration (2)
Parser.cs (2)
101Location lowerLocationInCompilation = modelTypeLocation is not null && modelTypeLocation.SourceTree is not null && _compilation.ContainsSyntaxTree(modelTypeLocation.SourceTree) 296Location location = memberLocation is not null && memberLocation.SourceTree is not null && _compilation.ContainsSyntaxTree(memberLocation.SourceTree)
System.Text.Json.SourceGeneration (1)
Helpers\RoslynExtensions.cs (1)
41=> location.SourceTree != null && compilation.ContainsSyntaxTree(location.SourceTree);