コード例 #1
0
        public ActionResult InfiniteScroll(int pageoffset)
        {
            GameCollection gameCollection = new GameCollection();

            System.Threading.Thread.Sleep(100);
            int pagesize    = 5;
            var syncContext = SynchronizationContext.Current;

            SynchronizationContext.SetSynchronizationContext(null);
            var data = gameCollection.GameList().Result;
            List <GameModel> tbrow     = gameCollection.InfiniteScrollList(pageoffset);
            JsonModel        jsonmodel = new JsonModel();

            jsonmodel.NoMoreData = tbrow.Count < pagesize;
            jsonmodel.HTMLString = renderPartialViewToString("ListGamesScroll", tbrow);
            return(Json(jsonmodel));
        }