コード例 #1
0
 // synchronization
 public bool /*ICollection<T>.*/ Remove(T item)
 {
     lock (SyncLock)
     {
         OnItemRemoved(item);
         return(RealListT.Remove(item));
     }
 }
コード例 #2
0
        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();
        }
コード例 #3
0
 public void Sort(Comparison <T> comparer)
 {
     lock (SyncLock) RealListT.Sort(comparer);
 }
コード例 #4
0
 // return the fast underlying
 public IEnumerable <T> GetBaseEnumerable()
 {
     return(new BaseEnumerable(RealListT.GetEnumerator()));
 }
コード例 #5
0
 public T[] ToArray()
 {
     lock (SyncLock) return(RealListT.ToArray());
 }