Show / Hide Table of Contents

    Interface ICurrencyService

    This IService manages all ICurrency controllers in the active IContent

    Namespace: IdleKit.Gameplay
    Assembly: cs.temp.dll.dll
    Syntax
    public interface ICurrencyService : IService

    Methods

    AddCurrencyAmount(CurrencyAmount)

    Adds an amount to a ICurrency. If granting an ICurrency that is a startCurrency of an IStage make sure to call it after the IStage has began.

    Declaration
    void AddCurrencyAmount(CurrencyAmount amount)
    Parameters
    Type Name Description
    CurrencyAmount amount

    AddCurrencyAmount(String, Double)

    Adds an amount to a ICurrency. If granting an ICurrency that is a startCurrency of an IStage make sure to call it after the IStage has began.

    Declaration
    void AddCurrencyAmount(string id, double amount)
    Parameters
    Type Name Description
    String id
    Double amount

    GetAllCurrencies()

    Returns all ICurrency.

    Declaration
    ICurrency[] GetAllCurrencies()
    Returns
    Type Description
    ICurrency[]

    GetAllCurrencies<T>()

    Returns the ICurrency that are assignable to type T.

    Declaration
    T[] GetAllCurrencies<T>()
        where T : class, ICurrency
    Returns
    Type Description
    T[]
    Type Parameters
    Name Description
    T

    GetAllCurrenciesWithAvailability(Boolean)

    Returns all ICurrency that has the availability

    Declaration
    ICurrency[] GetAllCurrenciesWithAvailability(bool availability)
    Parameters
    Type Name Description
    Boolean availability
    Returns
    Type Description
    ICurrency[]

    GetCurrencies<T>(Predicate<T>)

    Returns ICurrency entities which meets the conditions specified by the predicate.

    Declaration
    T[] GetCurrencies<T>(Predicate<T> predicate)
        where T : class, ICurrency
    Parameters
    Type Name Description
    Predicate<T> predicate
    Returns
    Type Description
    T[]
    Type Parameters
    Name Description
    T

    GetCurrenciesWithAllTags(String[])

    Returns ICurrency entities which contain all of the tagIds specified.

    Declaration
    ICurrency[] GetCurrenciesWithAllTags(string[] tagIds)
    Parameters
    Type Name Description
    String[] tagIds
    Returns
    Type Description
    ICurrency[]
    Remarks

    Supports searching for both Tag Id and Rarity Id.

    GetCurrenciesWithAnyTag(String[])

    Returns ICurrency entities which contain any of the tagIds specified.

    Declaration
    ICurrency[] GetCurrenciesWithAnyTag(string[] tagIds)
    Parameters
    Type Name Description
    String[] tagIds
    Returns
    Type Description
    ICurrency[]
    Remarks

    Supports searching for both Tag Id and Rarity Id.

    GetCurrenciesWithTag(String)

    Returns all ICurrency which contain the tagId specified.

    Declaration
    ICurrency[] GetCurrenciesWithTag(string tagId)
    Parameters
    Type Name Description
    String tagId
    Returns
    Type Description
    ICurrency[]
    Remarks

    Supports searching for both Tag Id and Rarity Id.

    GetCurrency(String)

    Returns a ICurrency by id

    Declaration
    ICurrency GetCurrency(string id)
    Parameters
    Type Name Description
    String id
    Returns
    Type Description
    ICurrency

    GetCurrency<T>(String)

    Returns the ICurrency associated to the id as type T.

    Declaration
    T GetCurrency<T>(string id)
        where T : class, ICurrency
    Parameters
    Type Name Description
    String id
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    GetCurrencyAmount(String)

    Returns a ICurrency amount by id

    Declaration
    double GetCurrencyAmount(string id)
    Parameters
    Type Name Description
    String id
    Returns
    Type Description
    Double

    HasCurrencyAmount(String, Double)

    Returns true when the reserve of a specified ICurrency is equal to or greater than the amount specified.

    Declaration
    bool HasCurrencyAmount(string id, double amount)
    Parameters
    Type Name Description
    String id
    Double amount
    Returns
    Type Description
    Boolean

    RemoveCurrencyAmount(CurrencyAmount)

    Removes an amount from a ICurrency

    Declaration
    void RemoveCurrencyAmount(CurrencyAmount amount)
    Parameters
    Type Name Description
    CurrencyAmount amount

    RemoveCurrencyAmount(String, Double)

    Removes an amount from a ICurrency

    Declaration
    void RemoveCurrencyAmount(string id, double amount)
    Parameters
    Type Name Description
    String id
    Double amount

    SetCurrencyAmount(CurrencyAmount)

    Sets a ICurrency of CurrencyId to the provided Amount

    Declaration
    void SetCurrencyAmount(CurrencyAmount amount)
    Parameters
    Type Name Description
    CurrencyAmount amount

    SetCurrencyAmount(String, Double)

    Sets a ICurrency of id to the provided amount

    Declaration
    void SetCurrencyAmount(string id, double amount)
    Parameters
    Type Name Description
    String id
    Double amount
    Back to top Copyright © 2020 East Side Games Inc.