예제 #1
0
        private string BuildTableWithPagination(List <LaunchInfo> launches, CacheContentType contentType, int currentPage)
        {
            var itemsToDisplay = _paginationService.GetItemsToDisplay(launches, currentPage);

            itemsToDisplay = itemsToDisplay.OrderBy(p => p.DateUtc ?? DateTime.MinValue).ToList();

            var maxPagesCount    = _paginationService.GetPagesCount(launches.Count);
            var paginationFooter = _paginationService.GetPaginationFooter(currentPage, maxPagesCount);

            return(_launchesListTableGenerator.Build(itemsToDisplay, contentType, currentPage, paginationFooter));
        }
예제 #2
0
        private string BuildTableWithPagination(List <CoreInfo> cores, int currentPage)
        {
            cores.Sort(CoreLaunchDateComparer);

            var itemsToDisplay = _paginationService.GetItemsToDisplay(cores, currentPage);

            var maxPagesCount    = _paginationService.GetPagesCount(cores.Count);
            var paginationFooter = _paginationService.GetPaginationFooter(currentPage, maxPagesCount);

            return(_coresListTableGenerator.Build(itemsToDisplay, currentPage, paginationFooter));
        }