Table of Contents

Class PagedList

Namespace
Biwen.QuickApi.UnitOfWork.Pagenation
Assembly
Biwen.QuickApi.dll

Provides some help methods for IPagedList<T> interface.

public static class PagedList
Inheritance
PagedList
Inherited Members

Methods

Create<T>(IEnumerable<T>, int, int, int)

Creates a new instance of IPagedList<T> from parameters.

public static IPagedList<T> Create<T>(IEnumerable<T> items, int pageIndex, int pageSize, int indexFrom)

Parameters

items IEnumerable<T>
pageIndex int
pageSize int
indexFrom int

Returns

IPagedList<T>

Type Parameters

T

Create<TSource, TResult>(IPagedList<TSource>, Func<IEnumerable<TSource>, IEnumerable<TResult>>)

Creates a new instance of <see cref="IPagedList{TResult}"/> from source of <see cref="IPagedList{TSource}"/> instance.

public static IPagedList<TResult> Create<TSource, TResult>(IPagedList<TSource> source, Func<IEnumerable<TSource>, IEnumerable<TResult>> converter)

Parameters

source IPagedList<TSource>

The source.

converter Func<IEnumerable<TSource>, IEnumerable<TResult>>

The converter.

Returns

IPagedList<TResult>

An instance of IPagedList<T>.

Type Parameters

TSource

The type of the source.

TResult

The type of the result.

Empty<T>()

Creates an empty of IPagedList<T>.

public static IPagedList<T> Empty<T>()

Returns

IPagedList<T>

An empty instance of IPagedList<T>.

Type Parameters

T

The type for paging

From<TSource, TResult>(IPagedList<TSource>, Func<IEnumerable<TSource>, IEnumerable<TResult>>)

Creates a new instance of IPagedList<T> from source of IPagedList<T> instance.

public static IPagedList<TResult> From<TSource, TResult>(IPagedList<TSource> source, Func<IEnumerable<TSource>, IEnumerable<TResult>> converter)

Parameters

source IPagedList<TSource>

The source.

converter Func<IEnumerable<TSource>, IEnumerable<TResult>>

The converter.

Returns

IPagedList<TResult>

An instance of IPagedList<T>.

Type Parameters

TSource

The type of the source.

TResult

The type of the result.