执行一个OLE命令,不使用参数直接对数据视图层次结构。
命名空间: Microsoft.VisualStudio.Data
程序集: Microsoft.VisualStudio.Data(在 Microsoft.VisualStudio.Data.dll 中)
语法
声明
Public Function ExecuteCommand ( _
itemId As Integer, _
command As OleCommand _
) As Object
public Object ExecuteCommand(
int itemId,
OleCommand command
)
public:
Object^ ExecuteCommand(
int itemId,
OleCommand^ command
)
member ExecuteCommand :
itemId:int *
command:OleCommand -> Object
public function ExecuteCommand(
itemId : int,
command : OleCommand
) : Object
参数
- itemId
类型:System.Int32
命令应执行的项ID。
- command
类型:Microsoft.VisualStudio.Data.OleCommand
OLE命令执行。
返回值
类型:System.Object
返回命令返回的值。
异常
异常 | 条件 |
---|---|
ArgumentNullException | command 参数为 null。 |
ArgumentException | 指定的itemId无效。 |
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。