Executes an OLE command directly on the data view hierarchy, with a specific execution option and arguments.
Namespace: Microsoft.VisualStudio.Data
Assembly: Microsoft.VisualStudio.Data (in Microsoft.VisualStudio.Data.dll)
Syntax
'宣言
Public Function ExecuteCommand ( _
itemId As Integer, _
command As OleCommand, _
executionOption As OleCommandExecutionOption, _
arguments As Object _
) As Object
'使用
Dim instance As DataViewHierarchyAccessor
Dim itemId As Integer
Dim command As OleCommand
Dim executionOption As OleCommandExecutionOption
Dim arguments As Object
Dim returnValue As Object
returnValue = instance.ExecuteCommand(itemId, _
command, executionOption, arguments)
public Object ExecuteCommand(
int itemId,
OleCommand command,
OleCommandExecutionOption executionOption,
Object arguments
)
public:
Object^ ExecuteCommand(
int itemId,
OleCommand^ command,
OleCommandExecutionOption executionOption,
Object^ arguments
)
public function ExecuteCommand(
itemId : int,
command : OleCommand,
executionOption : OleCommandExecutionOption,
arguments : Object
) : Object
Parameters
itemId
Type: System.Int32The item ID specifying the hierarchy on which the command should be executed.
command
Type: Microsoft.VisualStudio.Data.OleCommandThe OLE command to execute.
executionOption
Type: Microsoft.VisualStudio.Data.OleCommandExecutionOptionAn OLE execution option.
arguments
Type: System.ObjectArguments expected by the command.
Return Value
Type: System.Object
Returns the value returned by the command.
Exceptions
| Exception | Condition |
|---|---|
| ArgumentNullException | The command parameter is null. |
| ArgumentException | The specified itemId is invalid. |
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.
See Also
Reference
DataViewHierarchyAccessor Class