Share via


IUsingOperation 接口

定义

表示在使用可 Body 释放 Resources的 时执行的操作的 。

当前用法: (1) C# using 语句。 (2) VB Using 语句。

public interface class IUsingOperation : Microsoft::CodeAnalysis::IOperation
public interface IUsingOperation : Microsoft.CodeAnalysis.IOperation
type IUsingOperation = interface
    interface IOperation
Public Interface IUsingOperation
Implements IOperation
实现

注解

此节点与以下操作类型相关联:

此接口由其关联的 API 保留用于实现。 我们保留将来更改它的权利。

属性

Body

using 的主体,用于维护使用的资源。

ChildOperations

此操作的子操作的可枚举。

(继承自 IOperation)
Children
已过时.

此操作的子操作数组。 已弃用:请使用 ChildOperations

(继承自 IOperation)
ConstantValue

如果操作是计算结果为常量值的表达式, HasValue 则 为 true,并且 Value 是表达式的值。 否则, HasValue 为 false。

(继承自 IOperation)
IsAsynchronous

此使用 是否是异步的。 对于 VB,始终为 false。

IsImplicit

如果编译器生成 /由编译器代码隐式计算,则设置为 True

(继承自 IOperation)
Kind

标识操作的类型。

(继承自 IOperation)
Language

IOperation 的源语言。 可能的值为 CSharpVisualBasic

(继承自 IOperation)
Locals

在 中 Resources 声明的局部变量,范围跨越整个 IUsingOperation

Parent

将此操作作为子级的 IOperation。 根为 Null。

(继承自 IOperation)
Resources

引入的声明或由 使用保留的资源。

SemanticModel

用于生成此操作的可选语义模型。 对于使用 GetOperation(SyntaxNode, CancellationToken) API 和对分析器所做的操作回调从源生成的操作为非 null。 对于 中的操作, ControlFlowGraph为 Null。

(继承自 IOperation)
Syntax

已分析以生成操作的语法。

(继承自 IOperation)
Type

操作的结果类型;如果操作不生成结果,则为 null。

(继承自 IOperation)

方法

Accept(OperationVisitor)

表示在使用可 Body 释放 Resources的 时执行的操作的 。

当前用法: (1) C# using 语句。 (2) VB Using 语句。

(继承自 IOperation)
Accept<TArgument,TResult>(OperationVisitor<TArgument,TResult>, TArgument)

表示在使用可 Body 释放 Resources的 时执行的操作的 。

当前用法: (1) C# using 语句。 (2) VB Using 语句。

(继承自 IOperation)

扩展方法

Descendants(IOperation)

以求值顺序返回给定 operation 的所有后代运算。

DescendantsAndSelf(IOperation)

返回给定 operation 的所有后代运算,包括计算顺序中给定 operation 的 。

适用于