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

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