/// <summary> /// Performs additional custom processes after removing a new element from the CollectionBase instance /// </summary> /// <param name="item"></param> private void DetachItem(RssItem item) { System.Diagnostics.Debug.Assert(item != null); // reset parent channel item.SetChannel(null); // describe dirty event if (item != null && _parent != null) { item.PropertyChanged -= new System.ComponentModel.PropertyChangedEventHandler(_parent.OnSubItemPropertyChanged); } }
/// <summary> /// Performs additional custom processes after inserting a new element into the CollectionBase instance /// </summary> /// <param name="value"></param> private void AttachItem(RssItem value) { System.Diagnostics.Debug.Assert(value != null); // set parent channel value.SetChannel(this._parent); // subscribe dirty event if (value != null && _parent != null) { value.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(_parent.OnSubItemPropertyChanged); } }
/// <summary>Determines whether the RssItemCollection contains a specific value.</summary> public bool Contains(RssItem value) { return(base.List.Contains(value as object)); }
/// <summary>Inserts an IRssItem to the RssItemCollection at the specified position.</summary> public void Insert(int index, RssItem value) { base.List.Insert(index, value as object); }
/// <summary>Removes an item to the RssItemCollection.</summary> public void Remove(RssItem value) { base.List.Remove(value as object); }
/// <summary>Adds an item to the IRssItemCollection.</summary> public int Add(RssItem value) { return(base.List.Add(value as object)); }