OnPage 1.0.0
See the version list below for details.
dotnet add package OnPage --version 1.0.0
NuGet\Install-Package OnPage -Version 1.0.0
<PackageReference Include="OnPage" Version="1.0.0" />
paket add OnPage --version 1.0.0
#r "nuget: OnPage, 1.0.0"
// Install OnPage as a Cake Addin #addin nuget:?package=OnPage&version=1.0.0 // Install OnPage as a Cake Tool #tool nuget:?package=OnPage&version=1.0.0
OnPage
Introduction
Pagination is a common technique used to divide large datasets into smaller, manageable parts known as "pages." This allows for more efficient data retrieval and presentation, especially when dealing with large collections of data. In this NuGet project, we will implement pagination methods to help developers paginate their data effectively.
Methods
Page(index, size)
This method allows you to retrieve a specific page of data from the dataset based on the provided index
and size
parameters.
Parameters:
index
(int): The index of the page to retrieve. Page indexing starts from 1.size
(int): The number of items to display per page.
Example:
// Assuming you have a list of items named 'dataList'
int pageIndex = 2;
int pageSize = 10;
var pageItems = dataList.Page(pageIndex, pageSize);
// 'pageItems' will contain the items for the second page with 10 items per page.
### `FirstPage(size)`
This method allows you to retrieve a first page of data from the dataset based on the provided `size` parameters.
Parameters:
- `size` (int): The number of items to display per page.
Example:
```csharp
// Assuming you have a list of items named 'dataList'
int pageSize = 10;
var pageItems = dataList.FirstPage(pageSize);
// 'pageItems' will contain the items for the first page with 10 items per page.
### `LastPage(size)`
This method allows you to retrieve a last page of data from the dataset based on the provided `size` parameters.
Parameters:
- `size` (int): The number of items to display per page.
Example:
```csharp
// Assuming you have a list of items named 'dataList'
int pageSize = 10;
var pageItems = dataList.LastPage(pageSize);
// 'pageItems' will contain the items for the first page with 10 items per page.
### `CountOfPage(size)`
This method allows you to retrieve a count of pages of data from the dataset based on the provided `size` parameters.
Parameters:
- `size` (int): The number of items to display per page.
Example:
```csharp
// Assuming you have a list of items named 'dataList'
int pageSize = 10;
var pageCount = dataList.CountOfPages(pageSize);
// 'pageCount' will contain the count of pages of dataList
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
-
net6.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.