private Task OnPlayerSignedInDomainEventAsync(PlayerSignedInDomainEvent evt)
        {
            var playerDto = DomainGameService.MapToPlayerDto(evt.Player);

            return(PublishIfEnabledAsync(PlayerSignedInEvent.FromPlayer(
                                             playerDto
                                             )));
        }
        private Task OnPlayerSignedOutDomainEventAsync(PlayerSignedOutDomainEvent evt)
        {
            var playerDto = evt.Player != null?DomainGameService.MapToPlayerDto(evt.Player) : null;

            return(PublishIfEnabledAsync(PlayerSignedOutEvent.FromPlayer(
                                             playerDto
                                             )));
        }
        private Task OnPlayerLeftGameDomainEventAsync(PlayerLeftGameDomainEvent evt)
        {
            var playerDto = DomainGameService.MapToPlayerDto(evt.Player);

            return(PublishIfEnabledAsync(PlayerLeftGameEvent.FromPlayerInGame(
                                             evt.GameId,
                                             playerDto
                                             )));
        }
        private Task OnPlayerAddedToVesselRoleDomainEventAsync(PlayerAddedToVesselRoleDomainEvent evt)
        {
            var vesselDto = DomainGameService.MapToVesselDto(evt.Vessel);
            var playerDto = DomainGameService.MapToPlayerDto(evt.Player);

            return(PublishIfEnabledAsync(PlayerAddedToVesselRoleEvent.FromPlayerInGameVesselRole(
                                             evt.GameId,
                                             vesselDto,
                                             evt.VesselRole.Name,
                                             playerDto
                                             )));
        }