插入指定节点及其子节点,如果有,在指定的父节点下。
命名空间: Microsoft.VisualStudio.Data.Services.SupportEntities
程序集: Microsoft.VisualStudio.Data.Services(在 Microsoft.VisualStudio.Data.Services.dll 中)
语法
声明
Function InsertItem ( _
parentItemId As Integer, _
childSelectionInfo As IVsDataViewSelectionInfo, _
newItemId As Integer, _
identifier As Object() _
) As Boolean
bool InsertItem(
int parentItemId,
IVsDataViewSelectionInfo childSelectionInfo,
int newItemId,
Object[] identifier
)
bool InsertItem(
int parentItemId,
IVsDataViewSelectionInfo^ childSelectionInfo,
int newItemId,
array<Object^>^ identifier
)
abstract InsertItem :
parentItemId:int *
childSelectionInfo:IVsDataViewSelectionInfo *
newItemId:int *
identifier:Object[] -> bool
function InsertItem(
parentItemId : int,
childSelectionInfo : IVsDataViewSelectionInfo,
newItemId : int,
identifier : Object[]
) : boolean
参数
- parentItemId
类型:System.Int32
新的节点的父节点的全名。
- childSelectionInfo
类型:Microsoft.VisualStudio.Data.Services.IVsDataViewSelectionInfo
子节点的选择要插入的在新的节点下。
- newItemId
类型:System.Int32
或 参数为 。
- identifier
类型:array<System.Object[]
包含表示新节点的标识符部件的数组。
返回值
类型:System.Boolean
true ,如果插入了节点;否则,false。
异常
异常 | 条件 |
---|---|
ArgumentNullException | childSelectionInfo 参数为 nullnull 引用(在 Visual Basic 中为 Nothing)。 |
ArgumentException | childSelectionInfo 参数不是指定的父节点的子级。 |
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。