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