Exemplo n.º 1
0
 /// <summary>
 ///
 /// </summary>
 public void Dispose()
 {
     if (dictionary != null)
     {
         dictionary = null;
     }
 }
Exemplo n.º 2
0
 /// <summary>
 ///
 /// </summary>
 public void Dispose()
 {
     if (this.dictionary != null)
     {
         this.dictionary = null;
     }
 }
Exemplo n.º 3
0
                internal Enumerator(CDictionary <TKey, TValue> dictionary)
                {
                    this.dictionary = dictionary;
#if DEBUG
                    version = dictionary.version;
#endif
                    index        = 0;
                    currentValue = default(TValue);
                }
Exemplo n.º 4
0
            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>();
            }
Exemplo n.º 5
0
        /// <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);
        }
Exemplo n.º 6
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="dictionary"></param>
 public KeyCollection(CDictionary <TKey, TValue> dictionary)
 {
     Contract.Requires(dictionary != null);
     this.dictionary = dictionary;
 }