Пример #1
0
        protected override void RemoveItem(int index)
        {
            var item = this[index];

            base.RemoveItem(index);
            Added.AssertEmpty();
            Removed.AssertContainsOnly(item);
            Removed.Clear();
        }
Пример #2
0
        public override void Clear()
        {
            var items = this.ToArray();

            base.Clear();
            Removed.AssertContainsOnly(items);
            Removed.Clear();
            Added.AssertEmpty();
        }
Пример #3
0
 public override bool Remove(string item)
 {
     if (base.Remove(item))
     {
         Added.AssertEmpty();
         Removed.AssertContainsOnly(item);
         Removed.Clear();
         return(true);
     }
     else
     {
         Added.AssertEmpty();
         Removed.AssertEmpty();
         return(false);
     }
 }
Пример #4
0
 protected override bool Remove(string item, int index)
 {
     if (base.Remove(item, index))
     {
         Added.AssertEmpty();
         Removed.AssertContainsOnly(item);
         Removed.Clear();
         return(true);
     }
     else
     {
         Added.AssertEmpty();
         Removed.AssertEmpty();
         return(false);
     }
 }