docs.unity3d.com
    Show / Hide Table of Contents

    Class PageableResult<T, TSelf>

    The base class used for providing pageable results from the service e.g. GetBalancesResult.

    Inheritance
    Object
    PageableResult<T, TSelf>
    GetBalancesResult
    GetInventoryResult
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Unity.Services.Economy.Model
    Syntax
    [Preserve]
    public abstract class PageableResult<T, TSelf>
        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
    [Preserve]
    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
    [Preserve]
    public bool HasNext
    Field Value
    Type Description
    Boolean

    m_Results

    The list of fetched results of type T.

    Declaration
    [Preserve]
    protected List<T> m_Results
    Field Value
    Type Description
    List<T>

    Methods

    GetNextAsync(Int32)

    Fetches the next page of results.

    Declaration
    [Preserve]
    public async 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
    Type Condition
    EconomyException

    Thrown if request is unsuccessful

    GetNextResultsAsync(Int32)

    Declaration
    [Preserve]
    protected abstract Task<TSelf> GetNextResultsAsync(int itemsPerFetch)
    Parameters
    Type Name Description
    Int32 itemsPerFetch
    Returns
    Type Description
    Task<TSelf>
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023