예제 #1
0
 protected DictionaryImpl(int capacity, DictionaryImpl <TKey, TKeyStore, TValue, TComparer> other)
 {
     capacity = AlignToPowerOfTwo(capacity);
     _entries = new Entry[capacity];
     _size    = other._size;
     _topDict = other._topDict;
 }
예제 #2
0
        internal DictionaryImpl(int capacity, ConcurrentDictionary <TKey, TValue, TComparer> topDict)
        {
            capacity = Math.Max(capacity, MIN_SIZE);

            capacity = AlignToPowerOfTwo(capacity);
            _entries = new Entry[capacity];
            _size    = new Counter32();
            _topDict = topDict;
        }