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

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