SemanticModelAnalysisContext Struct

Definition

Context for a semantic model action. A semantic model action operates on the SemanticModel of a code document, and can use a SemanticModelAnalysisContext to report Diagnostics about the model.

public value class SemanticModelAnalysisContext
public struct SemanticModelAnalysisContext
public readonly struct SemanticModelAnalysisContext
type SemanticModelAnalysisContext = struct
Public Structure SemanticModelAnalysisContext
Inheritance
SemanticModelAnalysisContext

Constructors

SemanticModelAnalysisContext(SemanticModel, AnalyzerOptions, Action<Diagnostic>, Func<Diagnostic,Boolean>, CancellationToken)

Properties

CancellationToken

Token to check for requested cancellation of the analysis.

FilterSpan

Optional filter span within the FilterTree for which to compute diagnostics. null if we are analyzing the entire FilterTree or the entire compilation.

FilterTree

Syntax tree for the SemanticModel being analyzed.

IsGeneratedCode

Indicates if the underlying SyntaxTree is generated code.

Options

Options specified for the analysis.

SemanticModel

SemanticModel that is the subject of the analysis.

Methods

ReportDiagnostic(Diagnostic)

Report a Diagnostic about a SemanticModel.

Applies to