Пример #1
0
            public Unlocker(LockHelper Parent)
            {
                if (Parent == null)
                {
                    throw new NullReferenceException("Parent");
                }

                _parent = Parent;
            }
Пример #2
0
 public void Dispose()
 {
     lock (_lockObject)
     {
         if (_parent != null)
         {
             _parent.Unlock();
             _parent = null;
         }
         else
         {
             throw new Exception("Lock already released.");
         }
     }
 }