public void TestToString()
 {
     var urlBuilder = new IndieMarketplaceUrlBuilder
     {
         PageSize = 90,
         PageNumber = 2
     };
     Assert.AreEqual("http://marketplace.xbox.com/en-US/Games/XboxIndieGames?page=2&pagesize=90", urlBuilder.ToString());
 }
コード例 #2
0
        //
        // GET: /Home/
        public ActionResult Index()
        {
            var web = new HtmlWeb();
            var url = new IndieMarketplaceUrlBuilder { PageNumber = 1, PageSize = 90 };
            var doc = web.Load(url.ToString());

            var xp = new XboxParser();
            var games = xp.LoadTopGames(doc.DocumentNode);

            return View(new Index { TopGames = games.ToList() });
        }