Struct SyntaxTreeAnalysisContext
Assembly: Microsoft.CodeAnalysis.dll
Syntax
public readonly struct SyntaxTreeAnalysisContext
Constructors
SyntaxTreeAnalysisContext(SyntaxTree, AnalyzerOptions, Action<Diagnostic>, Func<Diagnostic, bool>, CancellationToken)
Declaration
[Obsolete("Use CompilationWithAnalyzers instead. See https://github.com/dotnet/roslyn/issues/63440 for more details.")]
public SyntaxTreeAnalysisContext(SyntaxTree tree, AnalyzerOptions options, Action<Diagnostic> reportDiagnostic, Func<Diagnostic, bool> isSupportedDiagnostic, CancellationToken cancellationToken)
Parameters
Properties
CancellationToken
Declaration
public CancellationToken CancellationToken { get; }
Property Value
FilterSpan
Declaration
public TextSpan? FilterSpan { get; }
Property Value
IsGeneratedCode
Declaration
public bool IsGeneratedCode { get; }
Property Value
Options
Declaration
public AnalyzerOptions Options { get; }
Property Value
Tree
Declaration
public SyntaxTree Tree { get; }
Property Value
Methods
ReportDiagnostic(Diagnostic)
Declaration
public void ReportDiagnostic(Diagnostic diagnostic)
Parameters