/// <summary> /// Returns a writable clone of this collection. /// </summary> public BTreeDictionary <TKey, TValue> Clone() { BTreeDictionary <TKey, TValue> copy = (BTreeDictionary <TKey, TValue>)MemberwiseClone(); copy._first = copy._last = null; copy._root = copy._root.Clone(ref copy._first, ref copy._last); copy._isReadOnly = false; return(copy); }
/// <summary> /// Returns a read-only clone of this collection. If this instance is already read-only the method will return this. /// </summary> public BTreeDictionary <TKey, TValue> MakeReadOnly() { if (_isReadOnly) { return(this); } BTreeDictionary <TKey, TValue> copy = Clone(); copy._isReadOnly = true; return(copy); }
public ValueCollection(BTreeDictionary <TKey, TValue> owner) { _owner = owner; }