Class PagedList<T>
Represents a snapshot of a single page of objects from a data store.
Inheritance
Namespace: DotNetNuke.Collections
Assembly: DotNetNuke.dll
Syntax
public class PagedList<T> : List<T>, IPagedList<T>
Type Parameters
Name | Description |
---|---|
T | The type of objects contained in this list. |
Constructors
| Improve this Doc View SourcePagedList(IEnumerable<T>, Int32, Int32, Int32)
Initializes a new instance of the PagedList<T> class. Initializes a new instance of the PagedList<T> a paged list containing objects from the selected enumerable source.
Declaration
public PagedList(IEnumerable<T> items, int totalCount, int pageIndex, int pageSize)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<T> | items | The items that constitute the page. |
System.Int32 | totalCount | The total number of items in the original source. |
System.Int32 | pageIndex | The index of the page to retrieve. |
System.Int32 | pageSize | The size of the page to retrieve. |
PagedList(IEnumerable<T>, Int32, Int32)
Initializes a new instance of the PagedList<T> class. Initializes a new instance of the PagedList<T> a paged list containing objects from the selected enumerable source.
Declaration
public PagedList(IEnumerable<T> source, int pageIndex, int pageSize)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<T> | source | The |
System.Int32 | pageIndex | The index of the page to retrieve. |
System.Int32 | pageSize | The size of the page to retrieve. |
Properties
| Improve this Doc View SourceHasNextPage
Gets a value indicating whether gets a boolean indicating if there is a next page available.
Declaration
public bool HasNextPage { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
HasPreviousPage
Gets a value indicating whether gets a boolean indicating if there is a previous page available.
Declaration
public bool HasPreviousPage { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsFirstPage
Gets a value indicating whether gets a boolean indicating if this is the first page.
Declaration
public bool IsFirstPage { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsLastPage
Gets a value indicating whether gets a boolean indicating if this is the last page.
Declaration
public bool IsLastPage { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
PageCount
Gets or sets the number of pages in this list.
Declaration
public int PageCount { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
PageIndex
Gets or sets the index of the page contained in this list.
Declaration
public int PageIndex { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
PageSize
Gets or sets the size of the page in this list.
Declaration
public int PageSize { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
TotalCount
Gets or sets or ses the total number of objects in the data store.
Declaration
public int TotalCount { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |