Click or drag to resize

CompilationAnalysisContext Class



Context for a compilation action or compilation end action. A compilation action or compilation end action can use a CompilationAnalysisContext to report Diagnostics about a Compilation.
Inheritance Hierarchy
SystemValueType
  Microsoft.CodeAnalysis.DiagnosticsCompilationAnalysisContext

Namespace:  Microsoft.CodeAnalysis.Diagnostics
Assembly:  Microsoft.CodeAnalysis (in Microsoft.CodeAnalysis.dll) Version: 2.3.0-dev-56735-00. Commit Hash: <developer build>
Syntax
public sealed class CompilationAnalysisContext : ValueType

The CompilationAnalysisContext type exposes the following members.

Constructors
  NameDescription
Public methodCompilationAnalysisContext
Initializes a new instance of the CompilationAnalysisContext class
Top
Properties
  NameDescription
Public propertyCancellationToken
Token to check for requested cancellation of the analysis.
Public propertyCompilation
Compilation that is the subject of the analysis.
Public propertyOptions
Options specified for the analysis.
Top
Methods
  NameDescription
Public methodReportDiagnostic
Report a Diagnostic about a Compilation.
Public methodTryGetValueTValue(SourceText, SourceTextValueProviderTValue, TValue)
Attempts to compute or get the cached value provided by the given valueProvider for the given text. Note that the pair {valueProvider, text} acts as the key. Reusing the same valueProvider instance across analyzer actions and/or analyzer instances can improve the overall analyzer performance by avoiding recomputation of the values.
Public methodTryGetValueTValue(SyntaxTree, SyntaxTreeValueProviderTValue, TValue)
Attempts to compute or get the cached value provided by the given valueProvider for the given tree. Note that the pair {valueProvider, tree} acts as the key. Reusing the same valueProvider instance across analyzer actions and/or analyzer instances can improve the overall analyzer performance by avoiding recomputation of the values.
Top
See Also