DataViewHierarchyAccessor.GetCommandStatus Method (Int32, OleCommand, OleCommandTextType)

Retrieves the status of an OLE command with a request for a particular type of command text.

Namespace:  Microsoft.VisualStudio.Data
Assembly:  Microsoft.VisualStudio.Data (in Microsoft.VisualStudio.Data.dll)

Syntax

'宣言
Public Function GetCommandStatus ( _
    itemId As Integer, _
    command As OleCommand, _
    textType As OleCommandTextType _
) As OleCommandStatus
'使用
Dim instance As DataViewHierarchyAccessor
Dim itemId As Integer
Dim command As OleCommand
Dim textType As OleCommandTextType
Dim returnValue As OleCommandStatus

returnValue = instance.GetCommandStatus(itemId, _
    command, textType)
public OleCommandStatus GetCommandStatus(
    int itemId,
    OleCommand command,
    OleCommandTextType textType
)
public:
OleCommandStatus^ GetCommandStatus(
    int itemId, 
    OleCommand^ command, 
    OleCommandTextType textType
)
public function GetCommandStatus(
    itemId : int, 
    command : OleCommand, 
    textType : OleCommandTextType
) : OleCommandStatus

Parameters

  • itemId
    Type: System.Int32

    The item ID for which the command status should be retrieved.

Return Value

Type: Microsoft.VisualStudio.Data.OleCommandStatus

Returns an OleCommandStatus object that describes the status of the OLE command.

Exceptions

Exception Condition
ArgumentNullException

The command parameter is null.

ArgumentException

The specified itemId is invalid.

Permissions

See Also

Reference

DataViewHierarchyAccessor Class

DataViewHierarchyAccessor Members

GetCommandStatus Overload

Microsoft.VisualStudio.Data Namespace