Class MemoryPagerBase<TItem>
IPager<TContent> implementation that wraps an in-memory collection.
Implements
IPager<TItem>
Namespace: Tableau.Migration.Paging
Assembly: Tableau.Migration.dll
Syntax
public abstract class MemoryPagerBase<TItem> : IPager<TItem>
Type Parameters
| Name | Description |
|---|---|
| TItem |
Constructors
MemoryPagerBase(int)
Creates a new MemoryPagerBase<TItem> object.
Declaration
public MemoryPagerBase(int pageSize)
Parameters
| Type | Name | Description |
|---|---|---|
| int | pageSize | The page size to page by. |
Methods
LoadItemsAsync(CancellationToken)
Loads items asynchronously.
Declaration
protected abstract Task<IResult<IReadOnlyCollection<TItem>>> LoadItemsAsync(CancellationToken cancel)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancel | The cancellation token to obey. |
Returns
| Type | Description |
|---|---|
| Task<IResult<IReadOnlyCollection<TItem>>> | The loaded items result. |
NextPageAsync(CancellationToken)
Gets the next page of content.
Declaration
public Task<IPagedResult<TItem>> NextPageAsync(CancellationToken cancel)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancel | The cancellation token to obey. |
Returns
| Type | Description |
|---|---|
| Task<IPagedResult<TItem>> | The paged results. |