24 references to ContainsSyntaxTree
Microsoft.CodeAnalysis (7)
Compilation\Compilation.cs (2)
3576Debug.Assert(this.ContainsSyntaxTree(tree1)); 3577Debug.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)
963ThrowExceptionIfFalse(compilation.ContainsSyntaxTree(tree), "The tree in the ProjectState should have been in the compilation."); 972ThrowExceptionIfFalse(compilation.ContainsSyntaxTree(tree), "The tree for the generated document should have been in the compilation.");
Microsoft.CodeAnalysis.Workspaces.UnitTests (12)
SolutionTests\SolutionTests.cs (12)
4299Assert.True(frozenCompilation.ContainsSyntaxTree(await frozenDocument.GetSyntaxTreeAsync())); 4300Assert.True(frozenCompilation.ContainsSyntaxTree(await originalProject.Documents.Single().GetSyntaxTreeAsync())); 4327Assert.True(frozenCompilation.ContainsSyntaxTree(await frozenDocument.GetSyntaxTreeAsync())); 4328Assert.True(frozenCompilation.ContainsSyntaxTree(await originalProject.Documents.Single().GetSyntaxTreeAsync())); 4741Assert.True(finalCompilation.ContainsSyntaxTree(syntaxTreeAfterRemovingEditorConfig)); 4787Assert.True(finalCompilation.ContainsSyntaxTree(syntaxTreeAfterEditorConfigChange)); 5607Assert.True(frozenCompilation.ContainsSyntaxTree(await frozenProject.Documents.Single().GetSyntaxTreeAsync())); 5632Assert.True(frozenCompilation1.ContainsSyntaxTree(await frozenProject1.Documents.Single().GetSyntaxTreeAsync())); 5659Assert.True(frozenCompilation1.ContainsSyntaxTree(await frozenProject1.Documents.Single().GetSyntaxTreeAsync())); 5689Assert.True(frozenCompilation1.ContainsSyntaxTree(await frozenProject1.Documents.Single().GetSyntaxTreeAsync())); 5696Assert.True(frozenCompilation2.ContainsSyntaxTree(await frozenProject2.Documents.Single().GetSyntaxTreeAsync())); 5723Assert.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);