Example #1
0
        internal static void CreateMap(AutoMapperService autoMapperService)
        {
            LeagueEntry.CreateMap(autoMapperService);

            autoMapperService.CreateMap <string, LeagueTypeEnum>()
            .ConvertUsing(x => LeagueTypeConsts.LeagueTypes.First(z => z.Value == x).Key);

            autoMapperService.CreateMap <string, TierEnum>()
            .ConvertUsing(x => TierConsts.Tiers.First(z => z.Value == x).Key);

            CreateMap <League>(autoMapperService);
            CreateMap <ILeague>(autoMapperService).As <League>();
        }
        internal static void CreateMap(AutoMapperService autoMapperService)
        {
            Models.AggregatedStats.CreateMap(autoMapperService);

            autoMapperService.CreateMap<string, PlayerStatSummaryTypeEnum>()
                .ConvertUsing(s => PlayerStatsSummaryTypeConsts.PlayerStatsSummaryTypes
                    .First(x => x.Value == s).Key);

            autoMapperService.CreateMap<PlayerStatsSummaryListDto, IEnumerable<IPlayerStatsSummary>>()
                .ConvertUsing(x => x.PlayerStatSummaries
                    .Select(autoMapperService.Map<PlayerStatsSummaryDto, PlayerStatsSummary>));

            autoMapperService.CreateApiModelMap<PlayerStatsSummaryDto, IPlayerStatsSummary>().As<PlayerStatsSummary>();
            autoMapperService.CreateApiModelMap<PlayerStatsSummaryDto, PlayerStatsSummary>();
        }
Example #3
0
        internal static void CreateMap(AutoMapperService autoMapperService)
        {
            Models.AggregatedStats.CreateMap(autoMapperService);

            autoMapperService.CreateMap <string, PlayerStatSummaryTypeEnum>()
            .ConvertUsing(s => PlayerStatsSummaryTypeConsts.PlayerStatsSummaryTypes
                          .First(x => x.Value == s).Key);

            autoMapperService.CreateMap <PlayerStatsSummaryListDto, IEnumerable <IPlayerStatsSummary> >()
            .ConvertUsing(x => x.PlayerStatSummaries
                          .Select(autoMapperService.Map <PlayerStatsSummaryDto, PlayerStatsSummary>));

            autoMapperService.CreateApiModelMap <PlayerStatsSummaryDto, IPlayerStatsSummary>().As <PlayerStatsSummary>();
            autoMapperService.CreateApiModelMap <PlayerStatsSummaryDto, PlayerStatsSummary>();
        }
Example #4
0
        internal static void CreateMap(AutoMapperService autoMapperService)
        {
            CreateMap <Champion>(autoMapperService);
            CreateMap <IChampion>(autoMapperService).As <Champion>();

            autoMapperService.CreateMap <ChampionListDto, IEnumerable <IChampion> >()
            .ConvertUsing(x => x.Champions.Select(autoMapperService.Map <ChampionDto, IChampion>));
        }
        internal static void CreateMap(AutoMapperService autoMapperService)
        {
            RuneSlot.CreateMap(autoMapperService);

            autoMapperService.CreateApiModelMap<RunePageDto, IRunePage>().As<RunePage>();
            autoMapperService.CreateApiModelMap<RunePageDto, RunePage>();

            autoMapperService.CreateMap<RunePagesDto, IEnumerable<IRunePage>>()
                .ConvertUsing(x => x.Pages.Select(autoMapperService.Map<RunePageDto, IRunePage>));
        }
Example #6
0
        internal static void CreateMap(AutoMapperService autoMapperService)
        {
            RuneSlot.CreateMap(autoMapperService);

            autoMapperService.CreateApiModelMap <RunePageDto, IRunePage>().As <RunePage>();
            autoMapperService.CreateApiModelMap <RunePageDto, RunePage>();

            autoMapperService.CreateMap <RunePagesDto, IEnumerable <IRunePage> >()
            .ConvertUsing(x => x.Pages.Select(autoMapperService.Map <RunePageDto, IRunePage>));
        }
        internal static void CreateMap(AutoMapperService autoMapperService)
        {
            Mastery.CreateMap(autoMapperService);

            autoMapperService.CreateApiModelMap <MasteryPageDto, IMasteryPage>().As <MasteryPage>();
            autoMapperService.CreateApiModelMap <MasteryPageDto, MasteryPage>();

            autoMapperService.CreateMap <MasteryPagesDto, IEnumerable <IMasteryPage> >()
            .ConvertUsing(x => x.Pages.Select(autoMapperService.Map <MasteryPageDto, IMasteryPage>));
        }
        internal static void CreateMap(AutoMapperService autoMapperService)
        {
            Mastery.CreateMap(autoMapperService);

            autoMapperService.CreateApiModelMap<MasteryPageDto, IMasteryPage>().As<MasteryPage>();
            autoMapperService.CreateApiModelMap<MasteryPageDto, MasteryPage>();

            autoMapperService.CreateMap<MasteryPagesDto, IEnumerable<IMasteryPage>>()
                .ConvertUsing(x => x.Pages.Select(autoMapperService.Map<MasteryPageDto, IMasteryPage>));
        }
Example #9
0
        internal static void CreateMap(AutoMapperService autoMapperService)
        {
            Player.CreateMap(autoMapperService);
            RawStats.CreateMap(autoMapperService);

            autoMapperService.CreateMap <string, GameTypeEnum>()
            .ConvertUsing(s => GameTypeConsts.GameTypes
                          .First(x => x.Value == s).Key);

            autoMapperService.CreateMap <string, GameModeEnum>()
            .ConvertUsing(s => GameModeConsts.GameModes
                          .First(x => x.Value == s).Key);

            autoMapperService.CreateMap <string, GameSubTypeEnum>()
            .ConvertUsing(s => GameSubTypeConsts.GameSubTypes
                          .First(x => x.Value == s).Key);

            CreateMap <Game>(autoMapperService);
            CreateMap <IGame>(autoMapperService).As <Game>();

            autoMapperService.CreateMap <RecentGamesDto, IEnumerable <IGame> >()
            .ConvertUsing(x => x.Games.Select(autoMapperService.Map <GameDto, IGame>));
        }