public DictionariesController(
     ILogger <DictionariesController> logger,
     IHttpContextAccessor httpContextAccessor,
     IWargamingApiClient wgApi,
     IBlitzStaticianDictionary blitzStaticianDictionary,
     ISecurityServise securityServise)
 {
     _logger = logger;
     _httpContextAccessor = httpContextAccessor;
     _wgApi = wgApi;
     _blitzStatisticsDictionary = blitzStaticianDictionary;
     _securityService           = securityServise;
 }
        public BuildGuestAccountInfoOperation(GuestAccountInfo guestAccountInfo,
                                              IAccountsTankInfoDataAccessor dataAccessor,
                                              IBlitzStaticianDictionary dictionayDataAccessor)
        {
            _guestAccountInfo             = guestAccountInfo;
            _accountsTankInfoDataAccessor = dataAccessor;
            _dictionaryDataAccessor       = dictionayDataAccessor;
            _playerStatDtoMapper          = new Mapper(new MapperConfiguration(m =>
                                                                               m.CreateMap <AccountInfoStatistics, PlayerStatDto>()));
            _clanInfoMapper = new Mapper(new MapperConfiguration(m =>
                                                                 m.CreateMap <AccountClanInfo, PlayerClanInfoDto>()
                                                                 .ForMember(d => d.PlayerRole, o => o.MapFrom(s => _dictionaryDataAccessor.GetClanRole(s.PlayerRole).GetAwaiter().GetResult()))));

            _tanksMapper = new Mapper(new MapperConfiguration(m =>
                                                              m.CreateMap <AccountTanksStatisticsTuple, AccountTankInfoDto>()
                                                              .ForMember(d => d.VehicleTier, o => o.MapFrom(s => Convert.ToInt32(s.Vehicle.Tier)))
                                                              .ForMember(d => d.TankTierRoman, o => o.MapFrom(s => Convert.ToInt32(s.Vehicle.Tier).ToRomanNumeral()))
                                                              .ForMember(d => d.PreviewLocalImage, o => o.MapFrom(s => s.Vehicle.PreviewImageUrl.MakeImagePathLocal()))
                                                              .ForMember(d => d.NormalLocalImage, o => o.MapFrom(s => s.Vehicle.NormalImageUrl.MakeImagePathLocal()))
                                                              ));
        }
Exemple #3
0
 public CalculateMiddleTierOperation(IBlitzStaticianDictionary blitzStaticianDictionary)
 {
     _blitzStaticianDictionary = blitzStaticianDictionary;
 }
 public DataBaseCheck(IBlitzStaticianDictionary blitzStaticianDictionary)
 {
     _blitzStaticianDictionary = blitzStaticianDictionary;
 }
Exemple #5
0
 public CalculateWn7Operation(IBlitzStaticianDictionary blitzStaticianDictionary)
 {
     _blitzStaticianDictionary = blitzStaticianDictionary;
 }