Esempio n. 1
0
 public ExtendedReadOnlyDictionary(IDictionary <TKey, TValue> dictionary)
 {
     if (dictionary == null)
     {
         throw new ArgumentNullException("dictionary");
     }
     _wrapped = dictionary;
     _keys    = new ExtendedReadOnlyCollection <TKey>(new DelegatedCollection <TKey>(() => _wrapped.Keys));
     _values  = new ExtendedReadOnlyCollection <TValue>(new DelegatedCollection <TValue>(() => _wrapped.Values));
 }
Esempio n. 2
0
 public ExtendedReadOnlyDictionary(IDictionary <TKey, TValue> dictionary)
 {
     _wrapped = Check.NotNullArgument(dictionary, "dictioanry");
     _keys    = new ExtendedReadOnlyCollection <TKey>(new DelegatedCollection <TKey>(() => _wrapped.Keys));
     _values  = new ExtendedReadOnlyCollection <TValue>(new DelegatedCollection <TValue>(() => _wrapped.Values));
 }