Esempio n. 1
0
        /// <inheritdoc />
        public TValue this[TKey key]
        {
            get
            {
                using (writeLock.LockRead())
                    return(InnerDictionary[key]);
            }

            set
            {
                using (writeLock.LockWrite())
                    InnerDictionary[key] = value;
            }
        }
Esempio n. 2
0
 /// <inheritdoc />
 public void Add(T item)
 {
     using (writeLock.LockWrite())
         InnerCollection.Add(item);
 }