AdditionalFileAnalysisContext Struct

Definition

Context for an additional file action. An additional file action can use an AdditionalFileAnalysisContext to report Diagnostics about a non-source AdditionalText document.

public readonly struct AdditionalFileAnalysisContext
type AdditionalFileAnalysisContext = struct
Public Structure AdditionalFileAnalysisContext
Inheritance
AdditionalFileAnalysisContext

Properties

AdditionalFile

AdditionalText that is the subject of the analysis.

CancellationToken

Token to check for requested cancellation of the analysis.

Compilation

Compilation being analyzed.

FilterSpan

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

Options

Options specified for the analysis.

Methods

ReportDiagnostic(Diagnostic)

Report a diagnostic for the given AdditionalFile. A diagnostic in a non-source document should be created with a non-source Location, which can be created using Create(String, TextSpan, LinePositionSpan) API.

Applies to