Exemple #1
0
 public WeakKeyDictionary(int capacity, IEqualityComparer <TKey> comparer)
 {
     _comparer  = new WeakKeyComparer <TKey>(comparer);
     _dict      = new Dictionary <object, TValue>(capacity, _comparer);
     _keyColl   = new KeyCollection(this);
     _valueColl = new ValueCollection(this);
 }
 public WeakKeyReference(T key, WeakKeyComparer <T> comparer)
     : base(key)
 {
     HashCode = comparer.GetHashCode(key);
 }