Esempio n. 1
0
 /// <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);
     }
 }
Esempio n. 2
0
 /// <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);
     }
 }