/// <summary> /// Raises the <see cref="Removed"/> event. /// </summary> /// <param name="args">A <see cref="DomainObjectCollectionChangeEventArgs"/> object that contains the event data.</param> /// <remarks> /// This method can be used to adjust internal state whenever an item is removed from the collection. /// If the collection is cleared through the <see cref="Clear"/> method <see cref="OnRemoved"/> /// is called for every item. /// </remarks> protected virtual void OnRemoved(DomainObjectCollectionChangeEventArgs args) { if (Removed != null) { Removed(this, args); } }
/// <summary> /// Raises the <see cref="Adding"/> event. /// </summary> /// <param name="args">A <see cref="DomainObjectCollectionChangeEventArgs"/> object that contains the event data.</param> protected virtual void OnAdding(DomainObjectCollectionChangeEventArgs args) { if (Adding != null) { Adding(this, args); } }