public void Dispose() { if (!this.HasLock) { return; } Monitor.Exit(this.locked); this.locked = null; this.HasLock = false; } }