2 writes to SourceTree
Microsoft.CodeAnalysis (2)
DiagnosticAnalyzer\SourceOrAdditionalFile.cs (2)
23
SourceTree
= tree;
30
SourceTree
= null;
37 references to SourceTree
Microsoft.CodeAnalysis (37)
DiagnosticAnalyzer\AnalysisContextInfo.cs (6)
64
Debug.Assert(node == null || file?.
SourceTree
!= null);
65
Debug.Assert(operation == null || file?.
SourceTree
!= null);
95
if (_file.Value.
SourceTree
!= null)
97
sb.AppendLine($"{nameof(SyntaxTree)}: {_file.Value.
SourceTree
.FilePath}");
109
RoslynDebug.Assert(_file.Value.
SourceTree
!= null);
111
var text = _file.Value.
SourceTree
.GetText();
DiagnosticAnalyzer\AnalysisResultBuilder.cs (4)
106
if (filterFile.
SourceTree
is { } tree)
132
if (filterFile.
SourceTree
is { } tree)
239
if (analysisScope.FilterFileOpt.Value.
SourceTree
!= null)
460
=> AddLocalDiagnosticsForPartialAnalysis_NoLock(localDiagnostics, analysisScope.FilterFileOpt!.Value.
SourceTree
, analysisScope.Analyzers, builder);
DiagnosticAnalyzer\AnalysisScope.cs (8)
123
var trees = filterFile.
SourceTree
!= null ? ImmutableArray.Create(filterFile.
SourceTree
) : ImmutableArray<SyntaxTree>.Empty;
162
if (filterSpan.HasValue && filterFile.GetValueOrDefault().
SourceTree
!= null)
170
if (filterSpan.GetValueOrDefault().Start == 0 && filterSpan.GetValueOrDefault().Length == filterFile.GetValueOrDefault().
SourceTree
!.Length)
228
return !FilterFileOpt.HasValue || FilterFileOpt.GetValueOrDefault().
SourceTree
== tree;
246
var filterTree = FilterFileOpt.GetValueOrDefault().
SourceTree
;
274
if (FilterFileOpt.GetValueOrDefault().
SourceTree
== null)
302
if (diagnostic.Location.SourceTree != filterFile.
SourceTree
)
DiagnosticAnalyzer\AnalyzerDriver.cs (5)
1708
analysisScope.OriginalFilterFile?.
SourceTree
, analysisScope.OriginalFilterSpan, cancellationToken, out var processedContainerEvent))
1804
AnalyzerExecutor.ExecuteSymbolActions(actionsByKind[(int)symbol.Kind], analyzer, symbolEvent, s_getTopmostNodeForAnalysis, isGeneratedCodeSymbol, analysisScope.FilterFileOpt?.
SourceTree
, analysisScope.FilterSpanOpt, cancellationToken);
1844
!AnalyzerExecutor.TryExecuteSymbolEndActions(symbolEndActionsForAnalyzer, analyzer, symbolEvent, s_getTopmostNodeForAnalysis, isGeneratedCodeSymbol, analysisScope.OriginalFilterFile?.
SourceTree
, analysisScope.OriginalFilterSpan, cancellationToken))
2124
var analyzerActions = await GetPerSymbolAnalyzerActionsAsync(symbol, analyzer, analysisScope.OriginalFilterFile?.
SourceTree
, analysisScope.OriginalFilterSpan, cancellationToken).ConfigureAwait(false);
2518
if (analysisScope.FilterFileOpt != null && analysisScope.FilterFileOpt?.
SourceTree
!= decl.SyntaxTree)
DiagnosticAnalyzer\AnalyzerExecutor.AnalyzerDiagnosticReporter.cs (2)
128
return _contextFile?.
SourceTree
!= null &&
129
_contextFile.Value.
SourceTree
== diagnostic.Location.SourceTree;
DiagnosticAnalyzer\AnalyzerExecutor.cs (2)
565
Debug.Assert(file.
SourceTree
!= null);
567
var tree = file.
SourceTree
;
DiagnosticAnalyzer\CompilationWithAnalyzers.cs (4)
897
var tree = originalFile.
SourceTree
!;
1013
var compilationUnitCompletedEvent = new CompilationUnitCompletedEvent(compilation, analysisScope.FilterFileOpt!.Value.
SourceTree
!, analysisScope.FilterSpanOpt);
1034
var mappedModel = compilation.GetSemanticModel(analysisScope.FilterFileOpt!.Value.
SourceTree
!);
1060
var tree = analysisScope.FilterFileOpt!.Value.
SourceTree
!;
DiagnosticAnalyzer\SourceOrAdditionalFile.cs (6)
12
/// For source files, <see cref="
SourceTree
"/> is non-null and <see cref="AdditionalFile"/> is null.
13
/// For additional files, <see cref="AdditionalFile"/> is non-null and <see cref="
SourceTree
"/> is null.
37
=>
SourceTree
== other.
SourceTree
&& AdditionalFile == other.AdditionalFile;
47
if (
SourceTree
!= null)
49
return Hash.Combine(true,
SourceTree
.GetHashCode());