Partager via


DataViewCommandHandler.ExecuteCommand Method

Definition

Overloads

ExecuteCommand(Int32, OleCommand, OleCommandExecutionOption, Object)

Causes the specified command to execute.

ExecuteCommand(Int32[], OleCommand, OleCommandExecutionOption, Object)

Causes the specified command to execute on multiple items.

ExecuteCommand(Int32, OleCommand, OleCommandExecutionOption, Object)

Causes the specified command to execute.

public:
 virtual System::Object ^ ExecuteCommand(int itemId, Microsoft::VisualStudio::Data::OleCommand ^ command, Microsoft::VisualStudio::Data::OleCommandExecutionOption executionOption, System::Object ^ arguments);
public virtual object ExecuteCommand (int itemId, Microsoft.VisualStudio.Data.OleCommand command, Microsoft.VisualStudio.Data.OleCommandExecutionOption executionOption, object arguments);
abstract member ExecuteCommand : int * Microsoft.VisualStudio.Data.OleCommand * Microsoft.VisualStudio.Data.OleCommandExecutionOption * obj -> obj
override this.ExecuteCommand : int * Microsoft.VisualStudio.Data.OleCommand * Microsoft.VisualStudio.Data.OleCommandExecutionOption * obj -> obj
Public Overridable Function ExecuteCommand (itemId As Integer, command As OleCommand, executionOption As OleCommandExecutionOption, arguments As Object) As Object

Parameters

itemId
Int32

The identifier of the item in the data view hierarchy on which this command should be invoked.

command
OleCommand

The OleCommand object representing the command to invoke.

executionOption
OleCommandExecutionOption

Any OleCommandExecutionOption object instance representing options on the invoked command.

arguments
Object

An object representing arguments to the command.

Returns

Returns an object instance representing the value returned by the specified command, which is typically nothing.

Exceptions

The command parameter is null.

The itemId parameter is invalid.

This command handler does not implement the specified command.

Applies to

ExecuteCommand(Int32[], OleCommand, OleCommandExecutionOption, Object)

Causes the specified command to execute on multiple items.

public:
 virtual cli::array <System::Object ^> ^ ExecuteCommand(cli::array <int> ^ itemIds, Microsoft::VisualStudio::Data::OleCommand ^ command, Microsoft::VisualStudio::Data::OleCommandExecutionOption executionOption, System::Object ^ arguments);
public virtual object[] ExecuteCommand (int[] itemIds, Microsoft.VisualStudio.Data.OleCommand command, Microsoft.VisualStudio.Data.OleCommandExecutionOption executionOption, object arguments);
abstract member ExecuteCommand : int[] * Microsoft.VisualStudio.Data.OleCommand * Microsoft.VisualStudio.Data.OleCommandExecutionOption * obj -> obj[]
override this.ExecuteCommand : int[] * Microsoft.VisualStudio.Data.OleCommand * Microsoft.VisualStudio.Data.OleCommandExecutionOption * obj -> obj[]
Public Overridable Function ExecuteCommand (itemIds As Integer(), command As OleCommand, executionOption As OleCommandExecutionOption, arguments As Object) As Object()

Parameters

itemIds
Int32[]

Array of identifiers for the items in the data view hierarchy on which this command should be invoked.

command
OleCommand

The OleCommand object representing the command to invoke.

executionOption
OleCommandExecutionOption

Any OleCommandExecutionOption object instance representing options on the invoked command.

arguments
Object

An object representing arguments to the command.

Returns

Object[]

Returns an object array representing values returned by the specified commands.

Exceptions

The itemId and/or command parameter is null.

The itemId parameter is invalid.

This command handler does not implement the specified command.

Applies to