Share via


Commands2 接口

包含环境中的所有命令(以 Command 对象的形式)。

命名空间:  EnvDTE80
程序集:  EnvDTE80(在 EnvDTE80.dll 中)

语法

声明
<GuidAttribute("7EAA857B-2356-494B-9E13-0F6EEFA86E43")> _
Public Interface Commands2 _
    Inherits Commands
[GuidAttribute("7EAA857B-2356-494B-9E13-0F6EEFA86E43")]
public interface Commands2 : Commands
[GuidAttribute(L"7EAA857B-2356-494B-9E13-0F6EEFA86E43")]
public interface class Commands2 : Commands
[<GuidAttribute("7EAA857B-2356-494B-9E13-0F6EEFA86E43")>]
type Commands2 =  
    interface 
        interface Commands 
    end
public interface Commands2 extends Commands

Commands2 类型公开以下成员。

属性

  名称 说明
公共属性 Count 获取一个值,该值指示 Commands 集合中对象的数目。
公共属性 DTE 获取顶级扩展性对象。
公共属性 Parent 获取 Commands 集合的直接父对象。

页首

方法

  名称 说明
公共方法 Add 基础结构。 仅由 Microsoft 内部使用。
公共方法 AddCommandBar 创建一个命令栏,该命令栏被保存并且在下次启动环境时可用。
公共方法 AddNamedCommand 创建命名命令,该命令由环境保存,并且在下次环境启动时(无论是否加载外接程序)可用。
公共方法 AddNamedCommand2 创建命名命令,该命令由环境保存,并且在下次环境启动时(无论是否加载外接程序)可用。
公共方法 CommandInfo 返回与给定 CommandBar 控件关联的命令 GUID 和 ID。
公共方法 GetEnumerator 获取 Commands 集合中项的枚举器。
公共方法 Item 返回集合的索引成员。
公共方法 Raise 执行指定的命令。
公共方法 RemoveCommandBar 移除用 AddCommandBar 方法创建的命令栏。
公共方法 UpdateCommandUI 强制刷新命令 UI 状态。

页首

请参阅

参考

EnvDTE80 命名空间