Share via


OperationBlockAnalysisContext Struct

Definition

Context for an operation block action or operation block end action. An operation block action or operation block end action can use an OperationAnalysisContext to report Diagnostics about an operation block.

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

Constructors

OperationBlockAnalysisContext(ImmutableArray<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 OperationBlocks.

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

IsGeneratedCode

Indicates if the OperationBlocks is generated code.

OperationBlocks

One or more operation blocks that are the subject of the analysis. This includes all blocks associated with the OwningSymbol, such as method body, field/property/constructor/parameter initializer(s), attributes, etc.

Options

Options specified for the analysis.

OwningSymbol

ISymbol for which the OperationBlocks provides a definition or value.

Methods

GetControlFlowGraph(IOperation)

Gets a ControlFlowGraph for a given operationBlock from this analysis context's OperationBlocks.

ReportDiagnostic(Diagnostic)

Report a Diagnostic about a code block.

Applies to