Читати англійською

Поділитися через


OperationAnalysisContext Struct

Definition

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

C#
public struct OperationAnalysisContext
C#
public readonly struct OperationAnalysisContext
Inheritance
OperationAnalysisContext

Constructors

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

Продукт Версії
Roslyn 4.2.0, 4.3.0, 4.4.0, 4.5.0, 4.6.0, 4.7.0, 4.8.0, 4.9.2, 3.0.0, 3.1.0, 3.2.0, 3.2.1, 3.3.1, 3.4.0, 3.5.0, 3.6.0, 3.7.0, 3.8.0, 3.9.0, 3.10.0, 3.11.0, 4.0.1, 4.1.0, 4.12.2, 4.13.0