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。
command
類型:Microsoft.VisualStudio.Data.OleCommand命令的狀態查詢。
傳回值
類型:Microsoft.VisualStudio.Data.OleCommandStatus
傳回描述的 OLE 命令狀態的 OleCommandStatus 物件。
例外狀況
例外狀況 | 條件 |
---|---|
ArgumentNullException | command 參數為 null。 |
ArgumentException | 指定的 itemId 無效。 |
.NET Framework 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。