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
類型:Int32新節點的父代的完整名稱。
childSelectionInfo
類型:Microsoft.VisualStudio.Data.Services.IVsDataViewSelectionInfo要插入的子節點的選取位於新的節點下。
newItemId
類型:Int32新節點的數值識別項可以插入。
identifier
類型:array<Object[]包含表示新結構的識別組件的陣列。
傳回值
類型:Boolean
true ,如果插入節點;否則, false。
例外狀況
例外狀況 | 條件 |
---|---|
ArgumentNullException | childSelectionInfo 參數為 nullnull 參考 (即 Visual Basic 中的 Nothing)。 |
ArgumentException | childSelectionInfo 參數不是指定的父代節點的子系。 |
.NET Framework 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。