/// <summary> /// /// </summary> public void Dispose() { if (dictionary != null) { dictionary = null; } }
/// <summary> /// /// </summary> public void Dispose() { if (this.dictionary != null) { this.dictionary = null; } }
internal Enumerator(CDictionary <TKey, TValue> dictionary) { this.dictionary = dictionary; #if DEBUG version = dictionary.version; #endif index = 0; currentValue = default(TValue); }
internal Enumerator(CDictionary <TKey, TValue> dictionary, int getEnumeratorRetType) { Contract.Requires(dictionary != null); this.dictionary = dictionary; #if DEBUG version = dictionary.version; #endif index = 0; this.getEnumeratorRetType = getEnumeratorRetType; current = new KeyValuePair <TKey, TValue>(); }
/// <summary> /// Clones this instance. /// </summary> /// <returns></returns> public CDictionary <TKey, TValue> Clone() { int count = this.count; CDictionary <TKey, TValue> res = new CDictionary <TKey, TValue>(this.Count, comparer); Entry[] entries = this.entries; for (int i = 0; i < count; i++) { if (entries[i].hashCode >= 0) { res.Add(entries[i].key, entries[i].value); } } return(res); }
/// <summary> /// /// </summary> /// <param name="dictionary"></param> public KeyCollection(CDictionary <TKey, TValue> dictionary) { Contract.Requires(dictionary != null); this.dictionary = dictionary; }