Exemplo n.º 1
0
        public override void Add(TKey key, TValue value)
        {
            if (key == null)
            {
                throw new ArgumentNullException("key");
            }
            WeakReference <TKey> weakKey = new WeakKeyReference <TKey>(key, comparer);

            dictionary.Add(weakKey, value);
        }
Exemplo n.º 2
0
        protected override void SetValue(TKey key, TValue value)
        {
            WeakReference <TKey> weakKey = new WeakKeyReference <TKey>(key, comparer);

            dictionary[weakKey] = value;
        }