4 instantiations of CompilationWithAnalyzers
Microsoft.CodeAnalysis (4)
DiagnosticAnalyzer\CompilationWithAnalyzers.cs (1)
69/// <inheritdoc cref="CompilationWithAnalyzers(Compilation, ImmutableArray{DiagnosticAnalyzer}, AnalyzerOptions?)"/>
DiagnosticAnalyzer\DiagnosticAnalyzerExtensions.cs (3)
19return new CompilationWithAnalyzers(compilation, analyzers, options, cancellationToken); 32return new CompilationWithAnalyzers(compilation, analyzers, options); 43return new CompilationWithAnalyzers(compilation, analyzers, analysisOptions);
60 references to CompilationWithAnalyzers
dotnet-format (1)
Analyzers\AnalyzerRunner.cs (1)
75var analyzerCompilation = compilation.WithAnalyzers(analyzers, analyzerOptions);
GenerateDocumentationAndConfigFiles (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\IPragmaSuppressionsAnalyzer.cs (1)
25CompilationWithAnalyzers hostCompilationWithAnalyzers,
Microsoft.CodeAnalysis (24)
DiagnosticAnalyzer\AnalysisScope.cs (7)
75/// Flag indicating if this analysis scope contains all analyzers from the corresponding <see cref="CompilationWithAnalyzers"/>, 76/// i.e. <see cref="Analyzers"/> is the same set as <see cref="CompilationWithAnalyzers.Analyzers"/>. 96public static AnalysisScope Create(Compilation compilation, ImmutableArray<DiagnosticAnalyzer> analyzers, CompilationWithAnalyzers compilationWithAnalyzers) 117public static AnalysisScope Create(ImmutableArray<DiagnosticAnalyzer> analyzers, SourceOrAdditionalFile filterFile, TextSpan? filterSpan, bool isSyntacticSingleFileAnalysis, CompilationWithAnalyzers compilationWithAnalyzers) 120public static AnalysisScope Create(ImmutableArray<DiagnosticAnalyzer> analyzers, SourceOrAdditionalFile filterFile, TextSpan? filterSpan, SourceOrAdditionalFile originalFilterFile, TextSpan? originalFilterSpan, bool isSyntacticSingleFileAnalysis, CompilationWithAnalyzers compilationWithAnalyzers) 191public AnalysisScope WithAnalyzers(ImmutableArray<DiagnosticAnalyzer> analyzers, CompilationWithAnalyzers compilationWithAnalyzers) 197private static bool ComputeHasAllAnalyzers(ImmutableArray<DiagnosticAnalyzer> analyzers, CompilationWithAnalyzers compilationWithAnalyzers)
DiagnosticAnalyzer\CachingSemanticModelProvider.cs (1)
17/// For example, <see cref="CompilationWithAnalyzers"/> uses this provider to ensure that semantic model instances
DiagnosticAnalyzer\CompilationWithAnalyzers.cs (11)
246/// <param name="analyzers">Analyzers whose diagnostics are required. All the given analyzers must be from the analyzers passed into the constructor of <see cref="CompilationWithAnalyzers"/>.</param> 266/// <param name="analyzers">Analyzers whose analysis results are required. All the given analyzers must be from the analyzers passed into the constructor of <see cref="CompilationWithAnalyzers"/>.</param> 327/// <param name="analyzers">Analyzers whose diagnostics are required. All the given analyzers must be from the analyzers passed into the constructor of <see cref="CompilationWithAnalyzers"/>.</param> 420/// <param name="analyzers">Analyzers whose diagnostics are required. All the given analyzers must be from the analyzers passed into the constructor of <see cref="CompilationWithAnalyzers"/>.</param> 437/// <param name="analyzers">Analyzers whose diagnostics are required. All the given analyzers must be from the analyzers passed into the constructor of <see cref="CompilationWithAnalyzers"/>.</param> 481/// <param name="analyzers">Analyzers whose diagnostics are required. All the given analyzers must be from the analyzers passed into the constructor of <see cref="CompilationWithAnalyzers"/>.</param> 497/// <param name="analyzers">Analyzers whose diagnostics are required. All the given analyzers must be from the analyzers passed into the constructor of <see cref="CompilationWithAnalyzers"/>.</param> 528/// <param name="analyzers">Analyzers whose diagnostics are required. All the given analyzers must be from the analyzers passed into the constructor of <see cref="CompilationWithAnalyzers"/>.</param> 562/// <param name="analyzers">Analyzers whose diagnostics are required. All the given analyzers must be from the analyzers passed into the constructor of <see cref="CompilationWithAnalyzers"/>.</param> 606/// <param name="analyzers">Analyzers whose diagnostics are required. All the given analyzers must be from the analyzers passed into the constructor of <see cref="CompilationWithAnalyzers"/>.</param> 636/// <param name="analyzers">Analyzers whose diagnostics are required. All the given analyzers must be from the analyzers passed into the constructor of <see cref="CompilationWithAnalyzers"/>.</param>
DiagnosticAnalyzer\CompilationWithAnalyzersOptions.cs (1)
10/// Options to configure analyzer execution within <see cref="CompilationWithAnalyzers"/>.
DiagnosticAnalyzer\DiagnosticAnalyzerExtensions.cs (4)
17public static CompilationWithAnalyzers WithAnalyzers(this Compilation compilation, ImmutableArray<DiagnosticAnalyzer> analyzers, AnalyzerOptions? options, CancellationToken cancellationToken) 29public static CompilationWithAnalyzers WithAnalyzers(this Compilation compilation, ImmutableArray<DiagnosticAnalyzer> analyzers, AnalyzerOptions? options = null) 40/// <param name="analysisOptions">Options to configure analyzer execution within <see cref="CompilationWithAnalyzers"/>.</param> 41public static CompilationWithAnalyzers WithAnalyzers(this Compilation compilation, ImmutableArray<DiagnosticAnalyzer> analyzers, CompilationWithAnalyzersOptions analysisOptions)
Microsoft.CodeAnalysis.Analyzers (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\IPragmaSuppressionsAnalyzer.cs (1)
25CompilationWithAnalyzers hostCompilationWithAnalyzers,
Microsoft.CodeAnalysis.AnalyzerUtilities (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\IPragmaSuppressionsAnalyzer.cs (1)
25CompilationWithAnalyzers hostCompilationWithAnalyzers,
Microsoft.CodeAnalysis.CodeStyle (5)
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (4)
87CompilationWithAnalyzers compilationWithAnalyzers, 393CompilationWithAnalyzers compilationWithAnalyzers, 509CompilationWithAnalyzers compilationWithAnalyzers, 621var effectiveDiagnostics = CompilationWithAnalyzers.GetEffectiveDiagnostics(diagnosticsBuilder, compilation);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\IPragmaSuppressionsAnalyzer.cs (1)
25CompilationWithAnalyzers hostCompilationWithAnalyzers,
Microsoft.CodeAnalysis.Features (24)
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.RemoveSuppressionCodeAction_Pragma.cs (1)
213var effectiveDiagnostic = CompilationWithAnalyzers.GetEffectiveDiagnostics([dummyDiagnosticWithLocationToCheck], model.Compilation).FirstOrDefault();
Diagnostics\Service\DiagnosticAnalyzerService.cs (1)
128Project project, CompilationWithAnalyzers compilationWithAnalyzers, bool logPerformanceInfo, bool getTelemetryInfo, CancellationToken cancellationToken)
Diagnostics\Service\DiagnosticAnalyzerService_CompilationWithAnalyzersPair.cs (6)
20/// Cached data from a <see cref="Project"/> to the <see cref="CompilationWithAnalyzers"/>s we've created for it. 23/// cref="CompilationWithAnalyzers"/> will use the <see cref="Compilation"/> it produces, and must see agree on that 38AsyncLazy<CompilationWithAnalyzers?>>> s_projectToCompilationWithAnalyzers = new(); 45private static async Task<CompilationWithAnalyzers?> GetOrCreateCompilationWithAnalyzers_OnlyCallInProcessAsync( 60AsyncLazy<CompilationWithAnalyzers?>? lazy; 77static async Task<CompilationWithAnalyzers?> CreateCompilationWithAnalyzersAsync(
Diagnostics\Service\DiagnosticAnalyzerService_ComputeDiagnosticAnalysisResults.cs (1)
26CompilationWithAnalyzers? compilationWithAnalyzers,
Diagnostics\Service\DiagnosticAnalyzerService_CoreAnalyze.cs (2)
30CompilationWithAnalyzers compilationWithAnalyzers, 190CompilationWithAnalyzers hostCompilationWithAnalyzers,
Diagnostics\Service\DiagnosticAnalyzerService_DeprioritizationCandidates.cs (1)
47CompilationWithAnalyzers? compilationWithAnalyzers = null;
Diagnostics\Service\DiagnosticAnalyzerService_GetDiagnosticsForSpan.cs (2)
292var compilationWithAnalyzers = await GetOrCreateCompilationWithAnalyzers_OnlyCallInProcessAsync( 306CompilationWithAnalyzers? compilationWithAnalyzers,
Diagnostics\Service\DiagnosticAnalyzerService_ProduceProjectDiagnostics.cs (1)
170var compilation = await GetOrCreateCompilationWithAnalyzers_OnlyCallInProcessAsync(
Diagnostics\Service\DocumentAnalysisExecutor.cs (3)
32private readonly CompilationWithAnalyzers? _compilationWithAnalyzers; 44CompilationWithAnalyzers? compilationWithAnalyzers, 159Debug.Assert(diags.Length == CompilationWithAnalyzers.GetEffectiveDiagnostics(diags, compilation).Count());
Diagnostics\Service\DocumentAnalysisExecutor_Helpers.cs (1)
114diagnostics = CompilationWithAnalyzers.GetEffectiveDiagnostics(diagnostics, compilation).ToImmutableArrayOrEmpty();
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (4)
87CompilationWithAnalyzers compilationWithAnalyzers, 393CompilationWithAnalyzers compilationWithAnalyzers, 509CompilationWithAnalyzers compilationWithAnalyzers, 621var effectiveDiagnostics = CompilationWithAnalyzers.GetEffectiveDiagnostics(diagnosticsBuilder, compilation);
SyncNamespaces\AbstractSyncNamespacesService.cs (1)
90var analyzerCompilation = compilation.WithAnalyzers(diagnosticAnalyzers, analyzerOptions);
Microsoft.CodeAnalysis.ResxSourceGenerator (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\IPragmaSuppressionsAnalyzer.cs (1)
25CompilationWithAnalyzers hostCompilationWithAnalyzers,
Microsoft.CodeAnalysis.Workspaces (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\IPragmaSuppressionsAnalyzer.cs (1)
25CompilationWithAnalyzers hostCompilationWithAnalyzers,
Roslyn.Diagnostics.Analyzers (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\IPragmaSuppressionsAnalyzer.cs (1)
25CompilationWithAnalyzers hostCompilationWithAnalyzers,