示例#1
0
        /// <summary>
        /// 清空整个CacheQueue,删除CacheQueue中所有的Cache项
        /// </summary>
        /// <remarks>
        /// <code source="..\Framework\TestProjects\DeluxeWorks.Library.Test\Caching\CacheQueueTest.cs" region="AddRemoveClearTest" lang="cs" title="增加、移除、获取CacheItem项" />
        /// </remarks>
        public override void Clear()
        {
            this.rWLock.AcquireWriterLock(this.lockTimeout);
            try
            {
                foreach (KeyValuePair <TKey, CacheItem <TKey, TValue> > kp in InnerDictionary)
                {
                    kp.Value.Dispose();
                }

                InnerDictionary.Clear();
            }
            finally
            {
                this.rWLock.ReleaseWriterLock();
            }
        }
 public void Clear()
 {
     InnerDictionary.Clear();
     Disposables.Clear();
 }
示例#3
0
 /// <summary>
 /// Removes all keys and values from the LazyDictionary.
 /// </summary>
 public void Clear()
 {
     InnerDictionary.Clear();
 }
示例#4
0
 /// <inheritdoc />
 public void Clear()
 {
     using (writeLock.LockWrite())
         InnerDictionary.Clear();
 }
 void ICollection <KeyValuePair <string, MethodParameterValue> > .Clear()
 {
     InnerDictionary.Clear();
 }
示例#6
0
 /// <inheritdoc />
 public void Clear()
 {
     EnsureWritable();
     InnerDictionary.Clear();
 }