Table of Contents

Method PageOf

Namespace
MailFathom.Application.Paging
Assembly
MailFathom.Application.dll

PageOf<TEntry>(IReadOnlyList<TEntry>, Func<TEntry, Guid>)

Cuts what a read of one row past this page returned into the page and where the next one continues.

public AdministrativeListingPage<TEntry> PageOf<TEntry>(IReadOnlyList<TEntry> readRows, Func<TEntry, Guid> identify)

Parameters

readRows IReadOnlyList<TEntry>

The rows the read returned, in identifier order, taken as one more than PageSize.

identify Func<TEntry, Guid>

Reads a row's identifier.

Returns

AdministrativeListingPage<TEntry>

The page.

Type Parameters

TEntry

What one row of the listing reads as.

Remarks

The row past the page is read only so its existence can be observed and is never presented, which is how the answer says whether a following page exists without counting the whole set. A read that reached past the page filled it, so the boundary row exists wherever a following page does.

Exceptions

ArgumentNullException

Thrown when readRows or identify is null.