/// <summary> /// Inserts a new item group after the specified insertion point. This method /// does nothing to manipulate the project's XML content. /// </summary> /// <remarks> /// </remarks> /// <owner>DavidLe</owner> /// <param name="newGroup"></param> /// <param name="insertionPoint"></param> internal void InsertAfter ( IItemPropertyGrouping newGroup, IItemPropertyGrouping insertionPoint ) { error.VerifyThrow(this.combinedGroupList != null, "Arraylist not initialized!"); this.combinedGroupList.Insert(this.combinedGroupList.IndexOf(insertionPoint) + 1, newGroup); if (newGroup is BuildItemGroup) { ((BuildItemGroup)newGroup).ParentCollection = this; ChangeItemGroupCount(1); } else if (newGroup is BuildPropertyGroup) { ((BuildPropertyGroup)newGroup).ParentCollection = this; ChangePropertyGroupCount(1); } else if (newGroup is Choose) { this.chooseCount++; } }
/// <summary> /// Inserts a new BuildItemGroup at the end of the list of ItemGroups. This method /// does nothing to manipulate the project's XML content. /// </summary> /// <remarks> /// </remarks> /// <owner>DavidLe</owner> /// <param name="newGroup"></param> internal void InsertAtEnd ( IItemPropertyGrouping newGroup ) { error.VerifyThrow(this.combinedGroupList != null, "Arraylist not initialized!"); this.combinedGroupList.Add(newGroup); if (newGroup is BuildItemGroup) { ((BuildItemGroup)newGroup).ParentCollection = this; ChangeItemGroupCount(1); } else if (newGroup is BuildPropertyGroup) { ((BuildPropertyGroup)newGroup).ParentCollection = this; ChangePropertyGroupCount(1); } else if (newGroup is Choose) this.chooseCount++; }