IOperation Interface

Definition

Root type for representing the abstract semantics of C# and VB statements and expressions.

public interface class IOperation
public interface IOperation
type IOperation = interface
Public Interface IOperation
Derived

Remarks

This interface is reserved for implementation by its associated APIs. We reserve the right to change it in the future.

Properties

ChildOperations

An enumerable of child operations for this operation.

Children
Obsolete.

An array of child operations for this operation. Deprecated: please use ChildOperations.

ConstantValue

If the operation is an expression that evaluates to a constant value, HasValue is true and Value is the value of the expression. Otherwise, HasValue is false.

IsImplicit

Set to True if compiler generated /implicitly computed by compiler code

Kind

Identifies the kind of the operation.

Language

The source language of the IOperation. Possible values are CSharp and VisualBasic.

Parent

IOperation that has this operation as a child. Null for the root.

SemanticModel

Optional semantic model that was used to generate this operation. Non-null for operations generated from source with GetOperation(SyntaxNode, CancellationToken) API and operation callbacks made to analyzers. Null for operations inside a ControlFlowGraph.

Syntax

Syntax that was analyzed to produce the operation.

Type

Result type of the operation, or null if the operation does not produce a result.

Methods

Accept(OperationVisitor)
Accept<TArgument,TResult>(OperationVisitor<TArgument,TResult>, TArgument)

Extension Methods

Descendants(IOperation)

Returns all the descendant operations of the given operation in evaluation order.

DescendantsAndSelf(IOperation)

Returns all the descendant operations of the given operation including the given operation in evaluation order.

Applies to