protected virtual void OnTasksRemoved(ICollection <T> tasks, IEnumerable <KeyValuePair <int, int> > indices) { EventHandler <TaskRemovedEventArgs <T> > handler = TaskRemoved; if (handler != null) { TaskRemovedEventArgs <T> e = new TaskRemovedEventArgs <T> (indices, tasks); if (commandQueue != null) { commandQueue.Register( new EventWrapper <TaskRemovedEventArgs <T> > (handler, this, e) ); } else { handler(this, e); } } }
protected virtual void OnTaskRemoved(int index, T task) { EventHandler <TaskRemovedEventArgs <T> > handler = TaskRemoved; if (handler != null) { TaskRemovedEventArgs <T> e = new TaskRemovedEventArgs <T> (index, task); if (commandQueue != null) { commandQueue.Register( new EventWrapper <TaskRemovedEventArgs <T> > (handler, this, e) ); } else { handler(this, e); } } }