public Unlocker(LockHelper Parent) { if (Parent == null) { throw new NullReferenceException("Parent"); } _parent = Parent; }
public void Dispose() { lock (_lockObject) { if (_parent != null) { _parent.Unlock(); _parent = null; } else { throw new Exception("Lock already released."); } } }