예제 #1
0
 public bool Remove(T key)
 {
     if (_items.Contains(key))
     {
         BeforeKeyRemoved?.Invoke(this, new KeyEventArg <T>(key));
     }
     return(_items.Remove(key));
 }
예제 #2
0
 public bool Remove(TK key)
 {
     if (_items.ContainsKey(key))
     {
         BeforeKeyRemoved?.Invoke(this, new KeyEventArg <TK>(key));
         T item = (T)_items[key];
         _items.Remove(key);
         item.PropertyChanged -= Value_PropertyChanged;
         return(true);
     }
     return(false);
 }