Exemplo n.º 1
0
 /// <summary>
 /// Dispose
 /// </summary>
 public void Dispose()
 {
     if (!this.IsDisposed)
     {
         this.IsDisposed = true;
         this.rwLock     = null;
         ReadLock.ClearCurrent();
         WriteLock.ClearCurrent();
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// 减少读取模式的递归计数,并在生成的计数为 0(零)时退出读取模式。
 /// </summary>
 public void ReleaseReadLock()
 {
     this.rwLock.ReleaseReaderLock();
     ReadLock.ClearCurrent();
 }