Partager via


DataViewHierarchyAccessor.ExecuteCommand Method (Int32, OleCommand, OleCommandExecutionOption, Object)

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

'Declaration
Public Function ExecuteCommand ( _
    itemId As Integer, _
    command As OleCommand, _
    executionOption As OleCommandExecutionOption, _
    arguments As Object _
) As Object
public Object ExecuteCommand(
    int itemId,
    OleCommand command,
    OleCommandExecutionOption executionOption,
    Object arguments
)
public:
Object^ ExecuteCommand(
    int itemId, 
    OleCommand^ command, 
    OleCommandExecutionOption executionOption, 
    Object^ arguments
)
member ExecuteCommand : 
        itemId:int * 
        command:OleCommand * 
        executionOption:OleCommandExecutionOption * 
        arguments:Object -> Object
public function ExecuteCommand(
    itemId : int, 
    command : OleCommand, 
    executionOption : OleCommandExecutionOption, 
    arguments : Object
) : Object

Parameters

  • itemId
    Type: System.Int32

    The item ID specifying the hierarchy on which the command should be executed.

  • arguments
    Type: System.Object

    Arguments 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.

.NET Framework Security

See Also

Reference

DataViewHierarchyAccessor Class

ExecuteCommand Overload

Microsoft.VisualStudio.Data Namespace