Example #1
0
 public HistoryViewModel(ServiceRecord serviceRecord, VariantClass variantClass, uint page, GameHistory gameHistory)
     : base(serviceRecord)
 {
     VariantClass = variantClass;
     Page = page;
     GameHistory = gameHistory;
 }
Example #2
0
        public ActionResult Index(string gamertag, ServiceRecord serviceRecord, string id)
        {
            var game = GlobalStorage.HReachManager.GetGameDetails(id);
            if (game == null)
            {
                return FlashMessage.RedirectAndFlash(Response, RedirectToAction("Index", "ServiceRecord"),
                    FlashMessage.FlashMessageType.Failure,
                    "Unable to load Game",
                    "It seems the specified game you tried to view doesn't exist, is invalid, or has been purged by 343.");
            }

            return View(new GameViewModel(serviceRecord, game));
        }
Example #3
0
        public ActionResult Index(string gamertag, ServiceRecord serviceRecord, string slug)
        {
            VariantClass variantClass;
            Enum.TryParse(slug, out variantClass);
            if (variantClass == VariantClass.All)
                return RedirectToAction("Index", "History", new
                {
                    area = "Reach", gamertag, slug = VariantClass.Competitive
                });

            var page = int.Parse(Request.QueryString["page"] ?? "0");
            if (page < 0) page = 0;
            var gameHistory = GlobalStorage.HReachManager.GetPlayerGameHistory(gamertag, variantClass, (uint) page);
            return View(new HistoryViewModel(serviceRecord, variantClass, (uint) page, gameHistory));
        }
Example #4
0
 public Base(ServiceRecord serviceRecord)
 {
     ServiceRecord = serviceRecord;
     RecentGamesHistory = GlobalStorage.HReachManager.GetPlayerGameHistory(ServiceRecord.Player.Gamertag, VariantClass.All);
     PublicGamertag = ServiceRecord.Player.Gamertag;
 }
Example #5
0
 public GameViewModel(ServiceRecord serviceRecord, Game game)
     : base(serviceRecord)
 {
     Game = game;
 }
 public ActionResult Index(string gamertag, ServiceRecord serviceRecord, string slug)
 {
     CommendationVariantClass commendationVariantClass;
     Enum.TryParse(slug, true, out commendationVariantClass);
     return View(new CommendationsViewModel(serviceRecord, commendationVariantClass));
 }
 public CommendationsViewModel(ServiceRecord serviceRecord, CommendationVariantClass commendationVariantClass)
     : base(serviceRecord)
 {
     CommendationVariantClass = commendationVariantClass;
 }
 public ActionResult RecentScreenshots(string gamertag, ServiceRecord serviceRecord)
 {
     var fileShare = GlobalStorage.HReachManager.GetPlayersRecentScreenshots(gamertag);
     return View(new FileShareViewModel(serviceRecord, fileShare));
 }
 public ActionResult File(string gamertag, ServiceRecord serviceRecord, string fileId)
 {
     var fileShare = GlobalStorage.HReachManager.GetPlayerFile(long.Parse(fileId));
     return View(new FileShareFileViewModel(serviceRecord, fileShare));
 }
 public FileShareFileViewModel(ServiceRecord serviceRecord, FileShare fileShare)
     : base(serviceRecord)
 {
     File = fileShare.Files.First();
 }
Example #11
0
 public FileShareViewModel(ServiceRecord serviceRecord, FileShare fileShare)
     : base(serviceRecord)
 {
     FileShare = fileShare;
 }
 public ServiceRecordViewModel(ServiceRecord serviceRecord)
     : base(serviceRecord)
 {
 }
 public ActionResult Index(string gamertag, ServiceRecord serviceRecord)
 {
     return View(new ServiceRecordViewModel(serviceRecord));
 }