public ExcludeLock(NmsSynchronizationMonitor parent)
            {
                this.parent = parent;

                currentLock = parent.GetCurrentLock();
                parent.SetCurrentLock(null);
            }
 private void Leave()
 {
     NestCounter--;
     if (NestCounter <= 0)
     {
         parent.ReleaseMonitor();
         parent.SetCurrentLock(null);
     }
 }
 public void Dispose()
 {
     parent.SetCurrentLock(this.currentLock);
 }