Exemple #1
0
        public LookupDictionary(IDictionary <TKey, TValue> dictionary, IEqualityComparer <TKey> comparer)
        {
            _lookup = new EntityLookup <TKey, TValue>(comparer, dictionary.Count + 1);

            foreach (var pair in dictionary)
            {
                _lookup.Add(pair.Key, pair.Value);
            }
        }
Exemple #2
0
 public LookupDictionary(int capacity, IEqualityComparer <TKey> comparer)
 {
     _lookup = new EntityLookup <TKey, TValue>(comparer, capacity);
 }