Search Results for

    Show / Hide Table of Contents

    Class TrTask<TSelf, TValue>

    Inheritance
    object
    TrTask<TSelf, TValue>
    TrAssetTaskBase<TSelf, TValue, TObj>
    TrStringTask
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Glitch9.AIDevKit.Sheets
    Assembly: Glitch9.AIDevKit.Sheets.dll
    Syntax
    public abstract class TrTask<TSelf, TValue> where TSelf : TrTask<TSelf, TValue>
    Type Parameters
    Name Description
    TSelf
    TValue

    Constructors

    | Edit this page View Source

    TrTask(string, string)

    Declaration
    protected TrTask(string key, string table)
    Parameters
    Type Name Description
    string key
    string table

    Properties

    | Edit this page View Source

    Key

    Declaration
    protected string Key { get; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    Table

    Declaration
    protected string Table { get; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    value

    Gets the localized value for this task. The value is fetched from the database using the key, table, and locale.

    Declaration
    public TValue value { get; }
    Property Value
    Type Description
    TValue

    Methods

    | Edit this page View Source

    BuildFinalKey(string)

    Declaration
    protected virtual string BuildFinalKey(string table)
    Parameters
    Type Name Description
    string table
    Returns
    Type Description
    string
    | Edit this page View Source

    Child(string)

    Specifies a child key to append to the main key. (e.g., if key is "item" and child is "description", the final key becomes "item.description")

    Declaration
    public TSelf Child(string key)
    Parameters
    Type Name Description
    string key

    The child key to append.

    Returns
    Type Description
    TSelf

    The current task instance for method chaining.

    | Edit this page View Source

    Fallback(TValue)

    Sets a fallback value to use if the localized value cannot be found.

    Declaration
    public TSelf Fallback(TValue v)
    Parameters
    Type Name Description
    TValue v

    The fallback value.

    Returns
    Type Description
    TSelf

    The current task instance for method chaining.

    | Edit this page View Source

    Invalidate()

    Declaration
    protected void Invalidate()
    | Edit this page View Source

    IsValid()

    Declaration
    protected bool IsValid()
    Returns
    Type Description
    bool
    | Edit this page View Source

    ProcessValue(TValue)

    Declaration
    protected virtual TValue ProcessValue(TValue raw)
    Parameters
    Type Name Description
    TValue raw
    Returns
    Type Description
    TValue
    | Edit this page View Source

    TryGetValue(string, string, out TValue)

    Declaration
    protected abstract bool TryGetValue(string table, string key, out TValue value)
    Parameters
    Type Name Description
    string table
    string key
    TValue value
    Returns
    Type Description
    bool
    | Edit this page View Source

    ValidateValue(TValue)

    Declaration
    protected virtual bool ValidateValue(TValue v)
    Parameters
    Type Name Description
    TValue v
    Returns
    Type Description
    bool

    Extension Methods

    ArrayExtensions.ToArrayOrEmpty<T>(T)
    ArrayExtensions.ToArrayOrNull<T>(T)
    EventExtensions.ToDelta<T>(T, string, int, string, bool)
    EventExtensions.ToDone<T>(T, string, int, string)
    EventExtensions.ToEvent<T>(T)
    EventExtensions.UpcastDelta<T1, T2>(T1, string, int, string, bool)
    FallbackExtensions.IsOr<TParent, TChild>(TParent, TChild)
    ResponseCastingExtensions.GetResult<T>(T)
    SystemExtensions.GetName(object)
    • Edit this page
    • View Source
    In this article
    Back to top AI DevKit Documentation