Beispiel #1
0
        public virtual ActionResult GetTopGamingGroups()
        {
            var topGamingGroups          = gamingGroupRetriever.GetTopGamingGroups(NUMBER_OF_TOP_GAMING_GROUPS_TO_SHOW);
            var topGamingGroupViewModels = topGamingGroups.Select(Mapper.Map <TopGamingGroupSummary, TopGamingGroupSummaryViewModel>).ToList();

            return(View(MVC.GamingGroup.Views.TopGamingGroups, topGamingGroupViewModels));
        }
Beispiel #2
0
        public virtual ActionResult Index()
        {
            List <TopPlayer>          topPlayers          = playerSummaryBuilder.GetTopPlayers(NUMBER_OF_TOP_PLAYERS_TO_SHOW);
            List <TopPlayerViewModel> topPlayerViewModels = topPlayers.Select(
                topPlayer => this.topPlayerViewModelBuilder.Build(topPlayer)).ToList();

            List <PublicGameSummary> publicGameSummaries = playedGameRetriever
                                                           .GetRecentPublicGames(NUMBER_OF_RECENT_PUBLIC_GAMES_TO_SHOW);

            List <NemesisChange> nemesisChanges = nemesisHistoryRetriever.GetRecentNemesisChanges(NUMBER_OF_RECENT_NEMESIS_CHANGES_TO_SHOW);

            var nemesisChangeViewModels = nemesisChangeViewModelBuilder.Build(nemesisChanges);

            var topGamingGroups = gamingGroupRetriever.GetTopGamingGroups(NUMBER_OF_TOP_GAMING_GROUPS_TO_SHOW);

            var topGamingGroupViewModels = topGamingGroups.Select(Mapper.Map <TopGamingGroupSummary, TopGamingGroupSummaryViewModel>).ToList();

            HomeIndexViewModel homeIndexViewModel = new HomeIndexViewModel()
            {
                TopPlayers           = topPlayerViewModels,
                RecentPublicGames    = publicGameSummaries,
                RecentNemesisChanges = nemesisChangeViewModels,
                TopGamingGroups      = topGamingGroupViewModels
            };

            return(View(MVC.Home.Views.Index, homeIndexViewModel));
        }
        public virtual ActionResult GetTopGamingGroups()
        {
            var topGamingGroups = gamingGroupRetriever.GetTopGamingGroups(NUMBER_OF_TOP_GAMING_GROUPS_TO_SHOW);
            var topGamingGroupViewModels = topGamingGroups.Select(transformer.Transform<TopGamingGroupSummaryViewModel>).ToList();

            return PartialView(MVC.GamingGroup.Views.TopGamingGroups, topGamingGroupViewModels);
        }
Beispiel #4
0
 public override List <TopGamingGroupSummary> GetFromSource(int numberOfGamingGroupsToRetrieve)
 {
     return(_gamingGroupRetriever.GetTopGamingGroups(numberOfGamingGroupsToRetrieve));
 }