OperationAnalysisContext Struct

Definition

Context for an operation action. An operation action can use an OperationAnalysisContext to report Diagnostics for an IOperation.

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

Constructors

OperationAnalysisContext(IOperation, ISymbol, Compilation, AnalyzerOptions, Action<Diagnostic>, Func<Diagnostic,Boolean>, CancellationToken)

Properties

CancellationToken

Token to check for requested cancellation of the analysis.

Compilation

Compilation containing the IOperation.

ContainingSymbol

ISymbol for the declaration containing the operation.

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

IsGeneratedCode

Indicates if the Operation is generated code.

Operation

IOperation that is the subject of the analysis.

Options

Options specified for the analysis.

Methods

GetControlFlowGraph()

Gets a ControlFlowGraph for the operation block containing the Operation.

ReportDiagnostic(Diagnostic)

Report a Diagnostic about a SyntaxNode.

Applies to