ToPagination Method
Definition
- Namespace
- Cuemon.Extensions.Collections.Generic
- Assemblies
- Cuemon.Extensions.Collections.Generic.dll
ToPagination<T>(IEnumerable<T>, Func<int>, Action<PaginationOptions>)
Converts the specified source to a generic and read-only pagination sequence.
public static PaginationEnumerable<T> ToPagination<T>(this IEnumerable<T> source, Func<int> totalElementCounter, Action<PaginationOptions> setup = null)
Parameters
sourceIEnumerable<T>An IEnumerable<T> to extend.
totalElementCounterFunc<int>The total element counter.
setupAction<PaginationOptions>The PaginationOptions which may be configured.
Returns
- PaginationEnumerable<T>
An instance of PaginationEnumerable<T>.
Type Parameters
TThe type of elements in the collection.