1 write to Compilation
Microsoft.CodeAnalysis (1)
DiagnosticAnalyzer\AnalyzerExecutor.cs (1)
150Compilation = compilation;
39 references to Compilation
Microsoft.CodeAnalysis (39)
DiagnosticAnalyzer\AnalyzerDriver.cs (7)
423_lazyGeneratedCodeAttribute = analyzerExecutor.Compilation?.GetTypeByMetadataName("System.CodeDom.Compiler.GeneratedCodeAttribute"); 931var effectiveSeverities = GetEffectiveSeverities(descriptor, AnalyzerExecutor.Compilation, AnalyzerExecutor.AnalyzerOptions, cancellationToken); 1003=> GetOrCreateSemanticModel(tree, AnalyzerExecutor.Compilation); 1393var configuredSeverity = descriptor.GetEffectiveSeverity(AnalyzerExecutor.Compilation.Options); 2035if (!IsDiagnosticAnalyzerSuppressed(analyzer, analyzerExecutor.Compilation.Options, analyzerManager, analyzerExecutor, analysisScope, severityFilter, cancellationToken)) 2235Debug.Assert(!IsDiagnosticAnalyzerSuppressed(analyzer, analyzerExecutor.Compilation.Options, analyzerManager, analyzerExecutor, analysisScope, severityFilter, cancellationToken)); 2260Debug.Assert(!IsDiagnosticAnalyzerSuppressed(analyzer, analyzerExecutor.Compilation.Options, analyzerManager, analyzerExecutor, analysisScope, severityFilter, cancellationToken));
DiagnosticAnalyzer\AnalyzerExecutor.cs (29)
63return _isAnalyzerSuppressedForTree(analyzer, tree, Compilation.Options.SyntaxTreeOptionsProvider, cancellationToken); 226Compilation, AnalyzerOptions, _compilationAnalysisValueProviderFactory, cancellationToken); 232new AnalysisContextInfo(Compilation), 266symbol, Compilation, AnalyzerOptions, isGeneratedCodeSymbol, filterTree, filterSpan, cancellationToken); 272new AnalysisContextInfo(Compilation, symbol), 297var context = new SuppressionAnalysisContext(Compilation, AnalyzerOptions, 304new AnalysisContextInfo(Compilation), 332Compilation, AnalyzerOptions, addDiagnostic, 339new AnalysisContextInfo(Compilation), 386var context = new SymbolAnalysisContext(symbol, Compilation, AnalyzerOptions, addDiagnostic, 393new AnalysisContextInfo(Compilation, symbol), 488var context = new SymbolAnalysisContext(symbol, Compilation, AnalyzerOptions, addDiagnostic, 495new AnalysisContextInfo(Compilation, symbol), 582var context = new SyntaxTreeAnalysisContext(tree, AnalyzerOptions, diagReporter.AddDiagnosticAction, isSupportedDiagnostic, Compilation, filterSpan, isGeneratedCode, cancellationToken); 589new AnalysisContextInfo(Compilation, file), 621var context = new AdditionalFileAnalysisContext(additionalFile, AnalyzerOptions, diagReporter.AddDiagnosticAction, isSupportedDiagnostic, Compilation, filterSpan, cancellationToken); 628new AnalysisContextInfo(Compilation, file), 657new AnalysisContextInfo(Compilation, node), 681new AnalysisContextInfo(Compilation, operation), 813new AnalysisContextInfo(Compilation, declaredSymbol, declaredNode), 836new AnalysisContextInfo(Compilation, declaredSymbol), 900new AnalysisContextInfo(Compilation, declaredSymbol, declaredNode), 915new AnalysisContextInfo(Compilation, declaredSymbol), 1192if (!this.Compilation.CatchAnalyzerExceptions) 1371return GetAddDiagnostic(contextSymbol, cachedDeclaringReferences, Compilation, analyzer, _addNonCategorizedDiagnostic, 1428if (_shouldSuppressGeneratedCodeDiagnostic(diagnostic, analyzer, Compilation, cancellationToken)) 1446return AnalyzerDiagnosticReporter.GetInstance(new SourceOrAdditionalFile(tree), span: null, Compilation, analyzer, isSyntaxDiagnostic: false, 1453return AnalyzerDiagnosticReporter.GetInstance(new SourceOrAdditionalFile(tree), span, Compilation, analyzer, isSyntaxDiagnostic: false, 1460return AnalyzerDiagnosticReporter.GetInstance(file, span: null, Compilation, analyzer, isSyntaxDiagnostic: true,
DiagnosticAnalyzer\AnalyzerManager.cs (3)
171if (sessionScope.GetAnalyzerActions().CompilationStartActionsCount > 0 && analyzerExecutor.Compilation != null) 317if (analyzerExecutor.Compilation.Options.SyntaxTreeOptionsProvider is { } treeOptions) 323analyzerExecutor.AnalyzerOptions.TryGetSeverityFromBulkConfiguration(tree, analyzerExecutor.Compilation, descriptor, cancellationToken, out configuredValue))