public Task Handle(PlayerUpdatedEvent notification, CancellationToken cancellationToken)
        {
            var player    = _context.Players.Find(notification.PlayerId);
            var playerDto = player == null ? null : _mapper.Map <GamePlayerDto>(player);

            var @event = new PlayerUpdatedPublicEvent(notification.GameId, notification.PlayerId, playerDto);

            return(_mediator.Publish(@event, cancellationToken));
        }
Exemple #2
0
 public Task Handle(PlayerUpdatedPublicEvent notification, CancellationToken cancellationToken)
 => Handle((IPublicEvent)notification, cancellationToken);