Beispiel #1
0
        private static IssuePagination CreateIssuePagination(int count, MetaIssuePagination metaIssuePagination)
        {
            var totalPages = (int)Math.Ceiling(count / (double)metaIssuePagination.PageSize);

            var issuePagination = new IssuePagination
            {
                Count        = count,
                CurrentPage  = MetaIssuePagination.Create(metaIssuePagination, totalPages, PageDirection.Current),
                NextPage     = MetaIssuePagination.Create(metaIssuePagination, totalPages, PageDirection.Next),
                PreviousPage = MetaIssuePagination.Create(metaIssuePagination, totalPages, PageDirection.Previous),
                TotalPages   = totalPages
            };

            return(issuePagination);
        }
Beispiel #2
0
 IssuesPagedList(List <GeminiIssueEntity> items, int count, MetaIssuePagination metaIssuePagination)
 {
     IssuePagination = CreateIssuePagination(count, metaIssuePagination);
     AddRange(items);
 }