/// <summary> /// <para> Removes a specific <see cref='.ProjectFile'/> from the /// <see cref='.ProjectFileCollection'/> .</para> /// </summary> /// <param name='value'>The <see cref='.ProjectFile'/> to remove from the <see cref='.ProjectFileCollection'/> .</param> /// <returns><para>None.</para></returns> /// <exception cref='System.ArgumentException'><paramref name='value'/> is not found in the Collection. </exception> public void Remove(ProjectFile value) { List.Remove (value); if (project != null) { value.SetProject (null); project.NotifyFileRemovedFromProject (value); } }
/// <summary> /// <para>Adds a <see cref='.ProjectFile'/> with the specified value to the /// <see cref='.ProjectFileCollection'/> .</para> /// </summary> /// <param name='value'>The <see cref='.ProjectFile'/> to add.</param> /// <returns> /// <para>The index at which the new element was inserted.</para> /// </returns> /// <seealso cref='.ProjectFileCollection.AddRange'/> public int Add(ProjectFile value) { int i = List.Add(value); if (project != null) { if (value.Project != null) throw new InvalidOperationException ("ProjectFile already belongs to a project"); value.SetProject (project); project.NotifyFileAddedToProject (value); } return i; }
/// <summary> /// <para>Inserts a <see cref='.ProjectFile'/> into the <see cref='.ProjectFileCollection'/> at the specified index.</para> /// </summary> /// <param name='index'>The zero-based index where <paramref name='value'/> should be inserted.</param> /// <param name=' value'>The <see cref='.ProjectFile'/> to insert.</param> /// <returns><para>None.</para></returns> /// <seealso cref='.ProjectFileCollection.Add'/> public void Insert(int index, ProjectFile value) { List.Insert(index, value); if (project != null) { if (value.Project != null) throw new InvalidOperationException ("ProjectFile already belongs to a project"); value.SetProject (project); project.NotifyFileAddedToProject (value); } }