24 references to ContainsSyntaxTree
Microsoft.CodeAnalysis (7)
Compilation\Compilation.cs (2)
3606Debug.Assert(this.ContainsSyntaxTree(tree1)); 3607Debug.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)
973ThrowExceptionIfFalse(compilation.ContainsSyntaxTree(tree), "The tree in the ProjectState should have been in the compilation."); 982ThrowExceptionIfFalse(compilation.ContainsSyntaxTree(tree), "The tree for the generated document should have been in the compilation.");
Microsoft.CodeAnalysis.Workspaces.UnitTests (12)
SolutionTests\SolutionTests.cs (12)
4315Assert.True(frozenCompilation.ContainsSyntaxTree(await frozenDocument.GetSyntaxTreeAsync())); 4316Assert.True(frozenCompilation.ContainsSyntaxTree(await originalProject.Documents.Single().GetSyntaxTreeAsync())); 4343Assert.True(frozenCompilation.ContainsSyntaxTree(await frozenDocument.GetSyntaxTreeAsync())); 4344Assert.True(frozenCompilation.ContainsSyntaxTree(await originalProject.Documents.Single().GetSyntaxTreeAsync())); 4757Assert.True(finalCompilation.ContainsSyntaxTree(syntaxTreeAfterRemovingEditorConfig)); 4803Assert.True(finalCompilation.ContainsSyntaxTree(syntaxTreeAfterEditorConfigChange)); 5640Assert.True(frozenCompilation.ContainsSyntaxTree(await frozenProject.Documents.Single().GetSyntaxTreeAsync())); 5665Assert.True(frozenCompilation1.ContainsSyntaxTree(await frozenProject1.Documents.Single().GetSyntaxTreeAsync())); 5692Assert.True(frozenCompilation1.ContainsSyntaxTree(await frozenProject1.Documents.Single().GetSyntaxTreeAsync())); 5722Assert.True(frozenCompilation1.ContainsSyntaxTree(await frozenProject1.Documents.Single().GetSyntaxTreeAsync())); 5729Assert.True(frozenCompilation2.ContainsSyntaxTree(await frozenProject2.Documents.Single().GetSyntaxTreeAsync())); 5756Assert.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);