Exemple #1
0
 public void SetNewVotesValue(VoteKey voteKey, int value)
 {
     _votes[voteKey] = value;
     _logger.LogInfo(
         Message.VotingResult_SetVotesValue,
         voteKey.ToString(),
         0, value,
         GetCounterValue(voteKey.ScannerSerialNumber));
 }
Exemple #2
0
        private void UpdateVotesValue(VoteKey voteKey, int newValue)
        {
            var currentValue = (int)_votes[voteKey];

            if (currentValue >= newValue)
            {
                _logger.LogInfo(
                    Message.VotingResult_TryToSetIncorrectVotesValue,
                    voteKey.ToString(),
                    currentValue, newValue,
                    GetCounterValue(voteKey.ScannerSerialNumber));
                return;
            }
            _votes[voteKey] = newValue;
            _logger.LogInfo(
                Message.VotingResult_SetVotesValue,
                voteKey.ToString(),
                currentValue, newValue,
                GetCounterValue(voteKey.ScannerSerialNumber));
        }
Exemple #3
0
 private void UpdateVotesValue(VoteKey voteKey, int newValue)
 {
     var currentValue = (int) _votes[voteKey];
     if (currentValue >= newValue)
     {
         _logger.LogInfo(
             Message.VotingResult_TryToSetIncorrectVotesValue,
             voteKey.ToString(),
             currentValue, newValue,
             GetCounterValue(voteKey.ScannerSerialNumber));
         return;
     }
     _votes[voteKey] = newValue;
     _logger.LogInfo(
         Message.VotingResult_SetVotesValue,
         voteKey.ToString(),
         currentValue, newValue,
         GetCounterValue(voteKey.ScannerSerialNumber));
 }
Exemple #4
0
 public void SetNewVotesValue(VoteKey voteKey, int value)
 {
     _votes[voteKey] = value;
     _logger.LogInfo(
         Message.VotingResult_SetVotesValue,
         voteKey.ToString(),
         0, value,
         GetCounterValue(voteKey.ScannerSerialNumber));
 }