Example #1
0
 public RoundService(IRoundRepository roundRepository,
                     IRoundPlayerRepository roundPlayerRepository,
                     ICardService cardService)
 {
     _roundRepository       = roundRepository;
     _roundPlayerRepository = roundPlayerRepository;
     _cardService           = cardService;
 }
Example #2
0
        public HistoryService(ICardRepository cardRepository,
                              IGameRepository gameRepository,
                              IRoundPlayerRepository roundRepository,
                              IHttpContextAccessor httpContextAccessor)
        {
            _cardRepository  = cardRepository;
            _gameRepository  = gameRepository;
            _roundRepository = roundRepository;
            string playerIdClaimValue = httpContextAccessor.HttpContext.User.FindFirst(Constants.ClaimPlayerId).Value;

            if (!string.IsNullOrEmpty(playerIdClaimValue))
            {
                _userId = long.Parse(playerIdClaimValue);
            }
        }