Class PageSelector<T>
Provides options to allow the consumer to select a page of data from a paged data store.
Inheritance
System.Object
PageSelector<T>
Namespace: DotNetNuke.Collections
Assembly: DotNetNuke.dll
Syntax
public class PageSelector<T> : object
Type Parameters
Name | Description |
---|---|
T | The type of object in the data store. |
Constructors
| Improve this Doc View SourcePageSelector(IEnumerable<T>, Int32)
Initializes a new instance of the PageSelector<T> class. Initializes a new instance of the PageSelector<T> for use on the specified data store.
Declaration
public PageSelector(IEnumerable<T> source, int pageSize)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<T> | source | The data store to page. |
System.Int32 | pageSize | The size of each page. |
Methods
| Improve this Doc View SourceGetPage(Int32)
Retrieves the specified page as a IPagedList<T>.
Declaration
public IPagedList<T> GetPage(int pageIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | pageIndex | The index (zero-based) of the page to retrieve. |
Returns
Type | Description |
---|---|
IPagedList<T> | An IPagedList<T> containing the page of data, or an empty list if the page does not exist. |