public TValue this[TKey key] { get { TValue value; if (_items.TryGetValue(key, out value)) { return(value); } return(ReturnValue(key)); } set { Assertor.AreTrue(IsReadOnly, "集合为只读"); _items[key] = value; } }
public void Clear() { Assertor.AreTrue(IsReadOnly, "集合为只读"); _items.Clear(); }
public bool Remove(TKey key) { Assertor.AreTrue(IsReadOnly, "集合为只读"); return(_items.Remove(key)); }