1 instantiation of AnalyzerDiagnosticReporter
Microsoft.CodeAnalysis (1)
DiagnosticAnalyzer\AnalyzerExecutor.AnalyzerDiagnosticReporter.cs (1)
25
new ObjectPool<AnalyzerDiagnosticReporter>(() => new
AnalyzerDiagnosticReporter
(), 10);
21 references to AnalyzerDiagnosticReporter
Microsoft.CodeAnalysis (21)
DiagnosticAnalyzer\AnalyzerExecutor.AnalyzerDiagnosticReporter.cs (5)
24
private static readonly ObjectPool<
AnalyzerDiagnosticReporter
> s_objectPool =
25
new ObjectPool<
AnalyzerDiagnosticReporter
>(() => new AnalyzerDiagnosticReporter(), 10);
27
public static
AnalyzerDiagnosticReporter
GetInstance(
39
var
item = s_objectPool.Allocate();
82
/// NOTE: <see cref="
AnalyzerDiagnosticReporter
"/> is a pooled type that is always used from a single
DiagnosticAnalyzer\AnalyzerExecutor.cs (16)
542
var
diagReporter = GetAddSemanticDiagnostic(semanticModel.SyntaxTree, analyzer, cancellationToken);
595
var
diagReporter = GetAddSyntaxDiagnostic(file, analyzer, cancellationToken);
640
var
diagReporter = GetAddSyntaxDiagnostic(file, analyzer, cancellationToken);
920
Action<
AnalyzerDiagnosticReporter
, Func<Diagnostic, CancellationToken, bool>, ExecutionData, TArgs, CancellationToken> executeActions,
921
Action<HashSet<TBlockAction>,
AnalyzerDiagnosticReporter
, Func<Diagnostic, CancellationToken, bool>, ExecutionData, TArgs, CancellationToken> executeBlockActions,
950
var
diagReporter = GetAddSemanticDiagnostic(
1015
var
diagReporter = GetAddSemanticDiagnostic(model.SyntaxTree, spanForContainingTopmostNodeForAnalysis, analyzer, cancellationToken);
1035
AnalyzerDiagnosticReporter
diagReporter,
1114
var
diagReporter = GetAddSemanticDiagnostic(model.SyntaxTree, spanForContainingOperationBlock, analyzer, cancellationToken);
1133
AnalyzerDiagnosticReporter
diagReporter,
1490
private
AnalyzerDiagnosticReporter
GetAddSemanticDiagnostic(SyntaxTree tree, DiagnosticAnalyzer analyzer, CancellationToken cancellationToken)
1492
return
AnalyzerDiagnosticReporter
.GetInstance(new SourceOrAdditionalFile(tree), span: null, Compilation, analyzer, isSyntaxDiagnostic: false,
1497
private
AnalyzerDiagnosticReporter
GetAddSemanticDiagnostic(SyntaxTree tree, TextSpan? span, DiagnosticAnalyzer analyzer, CancellationToken cancellationToken)
1499
return
AnalyzerDiagnosticReporter
.GetInstance(new SourceOrAdditionalFile(tree), span, Compilation, analyzer, isSyntaxDiagnostic: false,
1504
private
AnalyzerDiagnosticReporter
GetAddSyntaxDiagnostic(SourceOrAdditionalFile file, DiagnosticAnalyzer analyzer, CancellationToken cancellationToken)
1506
return
AnalyzerDiagnosticReporter
.GetInstance(file, span: null, Compilation, analyzer, isSyntaxDiagnostic: true,