/// <summary> /// Releases the lock. Subsequent calls to this method do nothing. /// </summary> public void Dispose() { if (this.parent == null) { return; } this.parent.Unlock(); this.parent = null; }
/// <summary> /// Constructs a new lock token for the specified lock. /// </summary> /// <param name="parent">The internal monitor used for locking.</param> internal LockToken(SyncLock parent) { this.parent = parent; }