ToPaginationList Method
Definition
- Namespace
- Cuemon.Extensions.Collections.Generic
- Assemblies
- Cuemon.Extensions.Collections.Generic.dll
ToPaginationList<T>(IEnumerable<T>, Func<int>, Action<PaginationOptions>)
Converts the specified source to an eagerly materialized generic and read-only pagination list.
public static PaginationList<T> ToPaginationList<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
- PaginationList<T>
An instance of PaginationList<T>.
Type Parameters
TThe type of elements in the collection.