Class IndexedPagerBase<TContent>
Abstract IPager<TContent> implementation uses an indexed page number. Defaults to 1-based index number as that is the indexing used in Tableau REST APIs.
Implements
IPager<TContent>
Namespace: Tableau.Migration.Paging
Assembly: Tableau.Migration.dll
Syntax
public abstract class IndexedPagerBase<TContent> : IPager<TContent>
Type Parameters
Name | Description |
---|---|
TContent | The content type. |
Constructors
IndexedPagerBase(int, int)
Creates a new IndexedPagerBase<TContent> object.
Declaration
public IndexedPagerBase(int pageSize, int defaultPageNumber = 1)
Parameters
Type | Name | Description |
---|---|---|
int | pageSize | The page size to page by. |
int | defaultPageNumber | The default page number to index on. |
Methods
GetPageAsync(int, int, CancellationToken)
Retrieves a page of data for a given page number.
Declaration
protected abstract Task<IPagedResult<TContent>> GetPageAsync(int pageNumber, int pageSize, CancellationToken cancel)
Parameters
Type | Name | Description |
---|---|---|
int | pageNumber | The page number to get data for. |
int | pageSize | The size of the page of data to get. |
CancellationToken | cancel | The cancellation token to obey. |
Returns
Type | Description |
---|---|
Task<IPagedResult<TContent>> | The paged results. |
NextPageAsync(CancellationToken)
Gets a page of content.
Declaration
public Task<IPagedResult<TContent>> NextPageAsync(CancellationToken cancel)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancel | The cancellation token to obey. |
Returns
Type | Description |
---|---|
Task<IPagedResult<TContent>> | The paged results. |