DataViewHierarchyAccessor.GetCommandStatus 方法 (Int32, OleCommand, OleCommandTextType)

检索一个OLE命令的状态与一个要求的命令文本的特定类型。

命名空间:  Microsoft.VisualStudio.Data
程序集:  Microsoft.VisualStudio.Data(在 Microsoft.VisualStudio.Data.dll 中)

语法

声明
Public Function GetCommandStatus ( _
    itemId As Integer, _
    command As OleCommand, _
    textType As OleCommandTextType _
) As OleCommandStatus
public OleCommandStatus GetCommandStatus(
    int itemId,
    OleCommand command,
    OleCommandTextType textType
)
public:
OleCommandStatus^ GetCommandStatus(
    int itemId, 
    OleCommand^ command, 
    OleCommandTextType textType
)
member GetCommandStatus : 
        itemId:int * 
        command:OleCommand * 
        textType:OleCommandTextType -> OleCommandStatus 
public function GetCommandStatus(
    itemId : int, 
    command : OleCommand, 
    textType : OleCommandTextType
) : OleCommandStatus

参数

  • itemId
    类型:System.Int32
    命令状态应检索的项ID。

返回值

类型:Microsoft.VisualStudio.Data.OleCommandStatus
返回描述OLE命令的状态的 OleCommandStatus 对象。

异常

异常 条件
ArgumentNullException

command 参数为 null。

ArgumentException

指定的itemId无效。

.NET Framework 安全性

请参见

参考

DataViewHierarchyAccessor 类

GetCommandStatus 重载

Microsoft.VisualStudio.Data 命名空间