public void SetNewVotesValue(VoteKey voteKey, int value) { _votes[voteKey] = value; _logger.LogInfo( Message.VotingResult_SetVotesValue, voteKey.ToString(), 0, value, GetCounterValue(voteKey.ScannerSerialNumber)); }
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)); }
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)); }