Udostępnij za pośrednictwem


SyntaxNodeAnalysisContext Struct

Definition

Context for a syntax node action. A syntax node action can use a SyntaxNodeAnalysisContext to report Diagnostics for a SyntaxNode.

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

Constructors

SyntaxNodeAnalysisContext(SyntaxNode, ISymbol, SemanticModel, AnalyzerOptions, Action<Diagnostic>, Func<Diagnostic,Boolean>, CancellationToken)
SyntaxNodeAnalysisContext(SyntaxNode, SemanticModel, AnalyzerOptions, Action<Diagnostic>, Func<Diagnostic,Boolean>, CancellationToken)

Properties

CancellationToken

Token to check for requested cancellation of the analysis.

Compilation

Compilation containing the SyntaxNode.

ContainingSymbol

ISymbol for the declaration containing the syntax node.

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 Node being analyzed.

IsGeneratedCode

Indicates if the Node is generated code.

Node

SyntaxNode that is the subject of the analysis.

Options

Options specified for the analysis.

SemanticModel

SemanticModel that can provide semantic information about the SyntaxNode.

Methods

ReportDiagnostic(Diagnostic)

Report a Diagnostic about a SyntaxNode.

Applies to