示例#1
0
 public AppViewModel(LeaderBoardViewModelDTO leaderBoardDto, KillBoardViewModelDTO killboardBoardDto, GraveYardViewModelDTO graveYardViewModelDto, HelpersManager helpersManager)
 {
     APINavLinkUrls       = new APINavLinkUrls(helpersManager);
     LeaderBoardViewModel = new LeaderBoardViewModel(leaderBoardDto);
     KillBoardViewModel   = new KillBoardViewModel(killboardBoardDto);
     GraveyardViewModel   = new GraveyardViewModel(graveYardViewModelDto);
 }
示例#2
0
 public LeaderBoardViewModel(LeaderBoardViewModelDTO leaderBoardDto)
 {
     Robots = leaderBoardDto.LeaderBoardRecord
              .Where(e => e.ActorType == "Robot")
              .OrderByDescending(e => e.CompletedErrandCount)
              .Take(5)
              .Select(e => new RobotViewModel(e));
     Cyborgs = leaderBoardDto.LeaderBoardRecord
               .Where(e => e.ActorType == "Cyborg")
               .OrderByDescending(e => e.CompletedErrandCount)
               .Take(5)
               .Select(e => new CyborgViewModel(e));
 }