public void tt()
 {
     var p = new PaginationInfo {
         FirstItemIndex = 350,
         PageSize = 25,
         PageSlide =  2,
         TotalItemCount = 398,
     };
     Assert.AreEqual(16, p.LastPage);
     Assert.AreEqual(15, p.CurrentPage);
     Assert.IsTrue(p.HasNextPage);
     var pages = p.Pages.ToArray();
     Assert.AreEqual(5, pages.Length);
     Assert.AreEqual(12, pages[0]);
     Assert.AreEqual(13, pages[1]);
     Assert.AreEqual(14, pages[2]);
     Assert.AreEqual(15, pages[3]);
     Assert.AreEqual(16, pages[4]);
 }
 public override IResult Execute(HttpContextBase context)
 {
     string contentType = null;
     var qs = context.Request.QueryString;
     if (qs.AllKeys.Contains("rss")) {
         ViewName = "QuartzNetWebConsole.Resources.Rss.html";
         contentType = "application/rss+xml";
     }
     var thisUrl = context.Request.Url.ToString().Split('?')[0];
     var pageSize = GetPageSize(qs);
     var pagination = new PaginationInfo {
         FirstItemIndex = GetStartIndex(qs),
         PageSize = pageSize,
         TotalItemCount = logsQ.Count(),
         PageUrl = "log.ashx?start=!0&max=" + pageSize,
     };
     var logs = logsQ.Skip(pagination.FirstItemIndex).Take(pagination.PageSize).ToList();
     return new ViewResult(new {logs, pagination, thisUrl}, ViewName) {
         ContentType = contentType,
     };
 }