示例#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 bool Contains(T item)
 {
     using (writeLock.LockRead())
         return(InnerCollection.Contains(item));
 }
 /// <inheritdoc />
 public override bool Equals(object obj)
 {
     using (writeLock.LockRead())
         return(_value.Equals(obj));
 }