Udostępnij za pośrednictwem


SyntaxTreeAnalysisContext Struct

Definition

Context for a syntax tree action. A syntax tree action can use a SyntaxTreeAnalysisContext to report Diagnostics about a SyntaxTree for a code document.

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

Constructors

SyntaxTreeAnalysisContext(SyntaxTree, AnalyzerOptions, Action<Diagnostic>, Func<Diagnostic,Boolean>, CancellationToken)

Properties

CancellationToken

Token to check for requested cancellation of the analysis.

FilterSpan

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

IsGeneratedCode

Indicates if the Tree is generated code.

Options

Options specified for the analysis.

Tree

SyntaxTree that is the subject of the analysis.

Methods

ReportDiagnostic(Diagnostic)

Report a Diagnostic about a SyntaxTree.

Applies to