共用方式為


DataViewHierarchyAccessor.GetCommandStatus 方法 (Int32, OleCommand)

擷取一個 OLE 命令的狀態。

命名空間:  Microsoft.VisualStudio.Data
組件:  Microsoft.VisualStudio.Data (在 Microsoft.VisualStudio.Data.dll 中)

語法

'宣告
Public Function GetCommandStatus ( _
    itemId As Integer, _
    command As OleCommand _
) As OleCommandStatus
public OleCommandStatus GetCommandStatus(
    int itemId,
    OleCommand command
)
public:
OleCommandStatus^ GetCommandStatus(
    int itemId, 
    OleCommand^ command
)
member GetCommandStatus : 
        itemId:int * 
        command:OleCommand -> OleCommandStatus
public function GetCommandStatus(
    itemId : int, 
    command : OleCommand
) : OleCommandStatus

參數

  • itemId
    類型:Int32

    命令狀態應該擷取的項目 ID。

傳回值

類型:Microsoft.VisualStudio.Data.OleCommandStatus
傳回描述的 OLE 命令狀態的 OleCommandStatus 物件。

例外狀況

例外狀況 條件
ArgumentNullException

command 參數為 null。

ArgumentException

指定的 itemId 無效。

.NET Framework 安全性

請參閱

參考

DataViewHierarchyAccessor 類別

GetCommandStatus 多載

Microsoft.VisualStudio.Data 命名空間