Table of Contents

ToPagination Method

Definition

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

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

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

PaginationEnumerable<T>

An instance of PaginationEnumerable<T>.

Type Parameters

T

The type of elements in the collection.