/// <inheritdoc /> public bool Remove(KeyValuePair <TIndex, TValue> item) { ICollectionContracts.Remove(this); if (!this.Contains(item)) { return(false); } this.indexable[item.Key] = TryValue.None <TValue>(); this.count--; return(true); }
/// <inheritdoc /> public bool Remove(T item) { ICollectionContracts.Remove(this); int count; if (this.countPerItem.TryGetValue(item, out count)) { if (count > 1) { this.countPerItem[item] = count - 1; } else { this.countPerItem.Remove(item); } return(true); } else { return(false); } }
/// <inheritdoc /> public bool Remove(KeyValuePair <TIndex, TValue> item) { ICollectionContracts.Remove(this); return(this.dictionary.Remove(item)); }
/// <inheritdoc /> public bool Remove(TBase item) { ICollectionContracts.Remove <TBase>(this); return(this.values.Remove(new KeyValuePair <Type, TBase>(item?.GetType(), item))); }
/// <inheritdoc /> public bool Remove(Type key) { ICollectionContracts.Remove <KeyValuePair <Type, TBase> >(this); return(this.values.Remove(key)); }
/// <inheritdoc /> public bool Remove(T item) { ICollectionContracts.Remove(this); return(this.instances.Remove(item)); }
/// <inheritdoc /> public bool Remove(IDisposable item) { ICollectionContracts.Remove(this); return(this.disposables.Remove(item)); }
/// <inheritdoc /> public virtual bool Remove(KeyValuePair <TKey, TValue> item) { ICollectionContracts.Remove(this); return(this.Dictionary.Remove(item)); }