IVsDataViewHierarchy.InsertItem 方法 (Int32, IVsDataViewSelectionInfo, Int32, array<Object )

插入指定节点及其子节点,如果有,在指定的父节点下。

命名空间:  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
    新的节点的父节点的全名。
  • identifier
    类型:array<System.Object[]
    包含表示新节点的标识符部件的数组。

返回值

类型:System.Boolean
true ,如果插入了节点;否则,false。

异常

异常 条件
ArgumentNullException

childSelectionInfo 参数为 nullnull 引用(在 Visual Basic 中为 Nothing)。

ArgumentException

childSelectionInfo 参数不是指定的父节点的子级。

.NET Framework 安全性

请参见

参考

IVsDataViewHierarchy 接口

InsertItem 重载

Microsoft.VisualStudio.Data.Services.SupportEntities 命名空间