コード例 #1
0
 protected override void Handle(SpeedPauseReachedCommand command)
 {
     if (command.RequestId == _currentWaitingId)
     {
         _numberOfClients++;
         if (_numberOfClients == _maxNumberOfClients)
         {
             SpeedPauseHelper.StateReached();
             _currentWaitingId = -1;
         }
     }
 }
コード例 #2
0
        protected override void Handle(SpeedPauseReachedCommand command)
        {
            if (command.RequestId == _currentWaitingId)
            {
                _numberOfClients++;
                if (_numberOfClients == _maxNumberOfClients)
                {
                    SpeedPauseHelper.StateReached();
                    _currentWaitingId = -1;

                    // Allow the response handler to process new requests
                    // We need to wait until now because responses of conflicting requests
                    // could arrive during the waiting phase, but need to be discarded.
                    SpeedPauseResponseHandler.ResetWaitingId();
                }
            }
        }