27 references to ContainsSyntaxTree
Microsoft.CodeAnalysis (7)
Compilation\Compilation.cs (2)
3697
Debug.Assert(this.
ContainsSyntaxTree
(tree1));
3698
Debug.Assert(this.
ContainsSyntaxTree
(tree2));
DiagnosticAnalyzer\AnalyzerDriver.cs (1)
1017
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.Features (2)
LanguageServices\SymbolDisplayService\AbstractSymbolDisplayService.AbstractSymbolDescriptionBuilder.cs (2)
128
if (model.Compilation.
ContainsSyntaxTree
(tree))
137
if (referencedCompilation.
ContainsSyntaxTree
(tree))
Microsoft.CodeAnalysis.Workspaces (2)
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker.cs (2)
982
ThrowExceptionIfFalse(compilation.
ContainsSyntaxTree
(tree), "The tree in the ProjectState should have been in the compilation.");
991
ThrowExceptionIfFalse(compilation.
ContainsSyntaxTree
(tree), "The tree for the generated document should have been in the compilation.");
Microsoft.CodeAnalysis.Workspaces.UnitTests (13)
SolutionTests\SolutionTests.cs (13)
4515
Assert.True(frozenCompilation.
ContainsSyntaxTree
(await frozenDocument.GetSyntaxTreeAsync()));
4516
Assert.True(frozenCompilation.
ContainsSyntaxTree
(await originalProject.Documents.Single().GetSyntaxTreeAsync()));
4543
Assert.True(frozenCompilation.
ContainsSyntaxTree
(await frozenDocument.GetSyntaxTreeAsync()));
4544
Assert.True(frozenCompilation.
ContainsSyntaxTree
(await originalProject.Documents.Single().GetSyntaxTreeAsync()));
4937
Assert.True(finalCompilation.
ContainsSyntaxTree
(syntaxTreeAfterRemovingEditorConfig));
4983
Assert.True(finalCompilation.
ContainsSyntaxTree
(syntaxTreeAfterEditorConfigChange));
5820
Assert.True(frozenCompilation.
ContainsSyntaxTree
(await frozenProject.Documents.Single().GetSyntaxTreeAsync()));
5845
Assert.True(frozenCompilation1.
ContainsSyntaxTree
(await frozenProject1.Documents.Single().GetSyntaxTreeAsync()));
5872
Assert.True(frozenCompilation1.
ContainsSyntaxTree
(await frozenProject1.Documents.Single().GetSyntaxTreeAsync()));
5902
Assert.True(frozenCompilation1.
ContainsSyntaxTree
(await frozenProject1.Documents.Single().GetSyntaxTreeAsync()));
5909
Assert.True(frozenCompilation2.
ContainsSyntaxTree
(await frozenProject2.Documents.Single().GetSyntaxTreeAsync()));
5936
Assert.True(forkedCompilation1.
ContainsSyntaxTree
(forkedSyntaxTree1));
5978
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);