Class PageableResult<T, TSelf>
The base class used for providing pageable results from the service e.g. GetBalancesResult.
Inheritance
PageableResult<T, TSelf>
Syntax
public abstract class PageableResult<T, TSelf> : object where TSelf : PageableResult<T, TSelf>
Type Parameters
| Name |
Description |
| T |
The type of resource that is being fetched. E.g. for GetBalancesResult, the type is PlayerBalance.
|
| TSelf |
|
Constructors
PageableResult(List<T>, Boolean)
Declaration
protected PageableResult(List<T> results, bool hasNext)
Parameters
| Type |
Name |
Description |
| List<T> |
results |
|
| Boolean |
hasNext |
|
Fields
HasNext
True if there are more pages of results to fetch.
Declaration
Field Value
m_Results
The list of fetched results of type T.
Declaration
protected List<T> m_Results
Field Value
Methods
GetNextAsync(Int32)
Fetches the next page of results.
Declaration
public Task<TSelf> GetNextAsync(int itemsPerFetch = 20)
Parameters
| Type |
Name |
Description |
| Int32 |
itemsPerFetch |
The number of items to fetch. Can be between 1-100 inclusive and defaults to 20.
|
Returns
| Type |
Description |
| Task<TSelf> |
A new results of type TSelf
|
Exceptions
GetNextResultsAsync(Int32)
Declaration
protected abstract Task<TSelf> GetNextResultsAsync(int itemsPerFetch)
Parameters
| Type |
Name |
Description |
| Int32 |
itemsPerFetch |
|
Returns
| Type |
Description |
| Task<TSelf> |
|