Ejemplo n.º 1
0
 /// <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;
 }
Ejemplo n.º 2
0
 /// <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;
 }