24 references to ContainsSyntaxTree
Microsoft.CodeAnalysis (7)
Compilation\Compilation.cs (2)
3576
Debug.Assert(this.
ContainsSyntaxTree
(tree1));
3577
Debug.Assert(this.
ContainsSyntaxTree
(tree2));
DiagnosticAnalyzer\AnalyzerDriver.cs (1)
1007
Debug.Assert(compilation.
ContainsSyntaxTree
(tree));
DiagnosticAnalyzer\CompilationUnitCompletedEvent.cs (1)
16
Debug.Assert(compilation.
ContainsSyntaxTree
(compilationUnit));
DiagnosticAnalyzer\CompilationWithAnalyzers.cs (2)
193
if (!_compilation.
ContainsSyntaxTree
(model.SyntaxTree))
206
if (!_compilation.
ContainsSyntaxTree
(tree))
DiagnosticAnalyzer\DiagnosticAnalysisContextHelpers.cs (1)
96
if (!compilation.
ContainsSyntaxTree
(location.SourceTree))
Microsoft.CodeAnalysis.Workspaces (2)
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker.cs (2)
963
ThrowExceptionIfFalse(compilation.
ContainsSyntaxTree
(tree), "The tree in the ProjectState should have been in the compilation.");
972
ThrowExceptionIfFalse(compilation.
ContainsSyntaxTree
(tree), "The tree for the generated document should have been in the compilation.");
Microsoft.CodeAnalysis.Workspaces.UnitTests (12)
SolutionTests\SolutionTests.cs (12)
4299
Assert.True(frozenCompilation.
ContainsSyntaxTree
(await frozenDocument.GetSyntaxTreeAsync()));
4300
Assert.True(frozenCompilation.
ContainsSyntaxTree
(await originalProject.Documents.Single().GetSyntaxTreeAsync()));
4327
Assert.True(frozenCompilation.
ContainsSyntaxTree
(await frozenDocument.GetSyntaxTreeAsync()));
4328
Assert.True(frozenCompilation.
ContainsSyntaxTree
(await originalProject.Documents.Single().GetSyntaxTreeAsync()));
4741
Assert.True(finalCompilation.
ContainsSyntaxTree
(syntaxTreeAfterRemovingEditorConfig));
4787
Assert.True(finalCompilation.
ContainsSyntaxTree
(syntaxTreeAfterEditorConfigChange));
5607
Assert.True(frozenCompilation.
ContainsSyntaxTree
(await frozenProject.Documents.Single().GetSyntaxTreeAsync()));
5632
Assert.True(frozenCompilation1.
ContainsSyntaxTree
(await frozenProject1.Documents.Single().GetSyntaxTreeAsync()));
5659
Assert.True(frozenCompilation1.
ContainsSyntaxTree
(await frozenProject1.Documents.Single().GetSyntaxTreeAsync()));
5689
Assert.True(frozenCompilation1.
ContainsSyntaxTree
(await frozenProject1.Documents.Single().GetSyntaxTreeAsync()));
5696
Assert.True(frozenCompilation2.
ContainsSyntaxTree
(await frozenProject2.Documents.Single().GetSyntaxTreeAsync()));
5723
Assert.True(forkedCompilation1.
ContainsSyntaxTree
(forkedSyntaxTree1));
Microsoft.Extensions.Options.SourceGeneration (2)
Parser.cs (2)
101
Location lowerLocationInCompilation = modelTypeLocation is not null && modelTypeLocation.SourceTree is not null && _compilation.
ContainsSyntaxTree
(modelTypeLocation.SourceTree)
296
Location 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);