public override void ApplyTo(BufferedList <T> collection, ICollection <T> list, List <T> added, List <T> removed) { removed.Add(item); collection.OnItemRemoving(new ItemEventArgs <T>(item)); list.Remove(item); collection.OnItemRemoved(new ItemEventArgs <T>(item)); }
public override void ApplyTo(BufferedList <T> collection, ICollection <T> list, List <T> added, List <T> removed) { T[] temp = list.ToArray(); removed.AddRange(temp); for (int i = 0; i < temp.Length; i++) { collection.OnItemRemoving(new ItemEventArgs <T>(temp[i])); } list.Clear(); for (int i = 0; i < temp.Length; i++) { collection.OnItemRemoved(new ItemEventArgs <T>(temp[i])); } }
public abstract void ApplyTo(BufferedList <T> collection, ICollection <T> list, List <T> added, List <T> removed);