C# Class Candor.PagingOptions

Show file Open project: michael-lang/candor-common Class Usage Examples

Public Methods

Method Description
GetDisabledPagingOptions ( ) : PagingOptions

Gets a set of PagingOptions with paging disabled.

GetItemCountForPage ( ) : int

Gets the number of items on the current page as determined by PageIndex. This will be the lesser of TotalItemCount minus the items on the previous pages and the PageSize; but no less than zero.

GetPagingByPage ( int page, int itemsPerPage ) : PagingOptions

Creates a new paging options based on a nullable page and page size.

GetTotalPageCount ( ) : int

Gets the total number of pages given the current paging details.

Method Details

GetDisabledPagingOptions() public static method

Gets a set of PagingOptions with paging disabled.
public static GetDisabledPagingOptions ( ) : PagingOptions
return PagingOptions

GetItemCountForPage() public method

Gets the number of items on the current page as determined by PageIndex. This will be the lesser of TotalItemCount minus the items on the previous pages and the PageSize; but no less than zero.
public GetItemCountForPage ( ) : int
return int

GetPagingByPage() public static method

Creates a new paging options based on a nullable page and page size.
public static GetPagingByPage ( int page, int itemsPerPage ) : PagingOptions
page int Either null, or a 1 based page number (not page index)
itemsPerPage int Either null for the default, or the number of items for each page.
return PagingOptions

GetTotalPageCount() public method

Gets the total number of pages given the current paging details.
public GetTotalPageCount ( ) : int
return int