Retrieves the status of the commands executing on the specified items.
Namespace: Microsoft.VisualStudio.Data
Assembly: Microsoft.VisualStudio.Data (in Microsoft.VisualStudio.Data.dll)
Syntax
'宣言
Public Overridable Function GetCommandStatus ( _
itemIds As Integer(), _
command As OleCommand, _
textType As OleCommandTextType, _
status As OleCommandStatus _
) As OleCommandStatus
'使用
Dim instance As DataViewCommandHandler
Dim itemIds As Integer()
Dim command As OleCommand
Dim textType As OleCommandTextType
Dim status As OleCommandStatus
Dim returnValue As OleCommandStatus
returnValue = instance.GetCommandStatus(itemIds, _
command, textType, status)
public virtual OleCommandStatus GetCommandStatus(
int[] itemIds,
OleCommand command,
OleCommandTextType textType,
OleCommandStatus status
)
public:
virtual OleCommandStatus^ GetCommandStatus(
array<int>^ itemIds,
OleCommand^ command,
OleCommandTextType textType,
OleCommandStatus^ status
)
public function GetCommandStatus(
itemIds : int[],
command : OleCommand,
textType : OleCommandTextType,
status : OleCommandStatus
) : OleCommandStatus
Parameters
itemIds
Type: []Array of identifiers for the items in the data view hierarchy on which this command should be invoked.
command
Type: Microsoft.VisualStudio.Data.OleCommandThe OleCommand object representing the command to invoke.
textType
Type: Microsoft.VisualStudio.Data.OleCommandTextTypeThe OleCommandTextType object instance for the specified command.
status
Type: Microsoft.VisualStudio.Data.OleCommandStatusThe OleCommandStatus object instance for the specified command.
Return Value
Type: Microsoft.VisualStudio.Data.OleCommandStatus
Returns an OleCommandStatus object instance representing the status returned by the specified commands.
Exceptions
| Exception | Condition |
|---|---|
| ArgumentNullException | The status, itemId and/or command parameter is null. |
| ArgumentException | The itemId parameter is invalid. |
Remarks
The caller of this method allocates the OleCommandStatus instance that holds the status of commands. The implementation of this method should set properties on this status object and then return the same instance.
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.