Table of Contents

ToPaginationList Method

Definition

Namespace
Cuemon.Extensions.Collections.Generic
Assemblies
Cuemon.Extensions.Collections.Generic.dll
Source
src/Cuemon.Extensions.Collections.Generic/EnumerableExtensions.cs

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

source IEnumerable<T>

An IEnumerable<T> to extend.

totalElementCounter Func<int>

The total element counter.

setup Action<PaginationOptions>

The PaginationOptions which may be configured.

Returns

PaginationList<T>

An instance of PaginationList<T>.

Type Parameters

T

The type of elements in the collection.