Exemplo n.º 1
0
 public new void Insert(int index, T item)
 {
     OnInsertBefore?.Invoke(this, new NListEventArgs <T>(item, -1));
     if (_stopcapacity > 0 && Count >= _stopcapacity)
     {
         Clear();
     }
     base.Insert(index, item);
     OnInsertAfter?.Invoke(this, new NListEventArgs <T>(item, index));
 }
Exemplo n.º 2
0
 public new void Add(T item)
 {
     OnInsertBefore?.Invoke(this, new NListEventArgs <T>(item, Count));
     if (_stopcapacity > 0 && Count >= _stopcapacity)
     {
         Clear();
     }
     base.Add(item);
     OnInsertAfter?.Invoke(this, new NListEventArgs <T>(item, Count));
 }