// synchronization public bool /*ICollection<T>.*/ Remove(T item) { lock (SyncLock) { OnItemRemoved(item); return(RealListT.Remove(item)); } }
public void RemoveRange(int index, int count) { int rcount = count; int rindex = index; while (rcount-- > 0) { lock (SyncLock) { T t = ((IList <T>) this)[rindex++]; OnItemRemoved(t); } } RealListT.RemoveRange(index, count); OnListModified(); }
public void Sort(Comparison <T> comparer) { lock (SyncLock) RealListT.Sort(comparer); }
// return the fast underlying public IEnumerable <T> GetBaseEnumerable() { return(new BaseEnumerable(RealListT.GetEnumerator())); }
public T[] ToArray() { lock (SyncLock) return(RealListT.ToArray()); }