This documentation is also published as Markdown for efficient machine reading: the whole site is indexed at /llms.txt, and every page has a clean Markdown copy at the same URL with .md appended. These are generated from the same source and cost far fewer tokens to read than this rendered HTML.

Skip to main content Skip to navigation

PagedList Pennington.Content

A single page of items with the bookkeeping the Pagination component needs to render prev/next controls and numbered page links.

Properties

HasNext bool
True when a page exists after Page.
HasPrevious bool
True when a page exists before Page.
Items IReadOnlyList<T>
Items in this page slice.
Page int
1-based page index this slice represents.
PageSize int
Items per page.
TotalItems int
Total item count across all pages.
TotalPages int
Total page count. At least 1 even when TotalItems is zero.

Constructors

PagedList

#
public PagedList`1(IReadOnlyList<T> Items, int Page, int PageSize, int TotalItems)

A single page of items with the bookkeeping the Pagination component needs to render prev/next controls and numbered page links.

Parameters

Items IReadOnlyList<T>
Items in this page slice.
Page int
1-based page index this slice represents.
PageSize int
Items per page.
TotalItems int
Total item count across all pages.

Pennington.Content.PagedList

namespace Pennington.Content;

/// A single page of items with the bookkeeping the Pagination component needs to render prev/next controls and numbered page links.
public record PagedList
{
    /// True when a page exists after Page.
    
public bool HasNext { get; }
/// True when a page exists before Page.
public bool HasPrevious { get; }
/// Items in this page slice.
public IReadOnlyList<T> Items { get; set; }
/// 1-based page index this slice represents.
public int Page { get; set; }
/// A single page of items with the bookkeeping the Pagination component needs to render prev/next controls and numbered page links.
public PagedList`1(IReadOnlyList<T> Items, int Page, int PageSize, int TotalItems)
; /// Items per page.
public int PageSize { get; set; }
/// Total item count across all pages.
public int TotalItems { get; set; }
/// Total page count. At least 1 even when TotalItems is zero.
public int TotalPages { get; }
}