コード例 #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.");
         }
     }
 }