public void Consume(BetWon @event) { var statistics = GetPlayerBetStatistics(@event.PlayerId); statistics.TotalWon += @event.Amount; _playerRepository.SaveChanges(); }
public void Handle(BetWon @event) { EngageWalletChanges( @event.PlayerId, (wallet, repository) => { var transaction = wallet.WinBet(@event.RoundId, @event.Amount, @event.GameActionId); HandlePositiveTurnover(@event, repository, wallet, transaction); }); }
public void Handle(BetWon wonEvent) { var reportRepository = _reportRepositoryFactory(); var record = GetBetHistoryRecordOrNull(reportRepository, wonEvent.RoundId); if (record == null) { throw new RegoException(string.Format(BetHistoryRecordNotFoundMessage, wonEvent.RoundId)); } record.TotalWinLoss += wonEvent.Amount; reportRepository.SaveChanges(); }
public void Consume(BetWon message) { _eventHandlers.Handle(message); }
public void Consume(BetWon message) { _gameSubscriber.Handle(message); }