Search Results for

    Show / Hide Table of Contents

    Class TrStringTask

    Inheritance
    object
    TrTask<TrStringTask, string>
    TrStringTask
    Inherited Members
    TrTask<TrStringTask, string>.Key
    TrTask<TrStringTask, string>.Table
    TrTask<TrStringTask, string>.IsValid()
    TrTask<TrStringTask, string>.Invalidate()
    TrTask<TrStringTask, string>.TryGetValue(string, string, out string)
    TrTask<TrStringTask, string>.ProcessValue(string)
    TrTask<TrStringTask, string>.ValidateValue(string)
    TrTask<TrStringTask, string>.BuildFinalKey(string)
    TrTask<TrStringTask, string>.value
    TrTask<TrStringTask, string>.Child(string)
    TrTask<TrStringTask, string>.Fallback(string)
    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 class TrStringTask : TrTask<TrStringTask, string>

    Constructors

    | Edit this page View Source

    TrStringTask(string, string)

    Declaration
    public TrStringTask(string key, string table)
    Parameters
    Type Name Description
    string key
    string table

    Methods

    | Edit this page View Source

    Abbr()

    Sets the text format to Abbreviated. Shorthand for TextFormat(TextFormat) with Abbreviated.

    Declaration
    public TrStringTask Abbr()
    Returns
    Type Description
    TrStringTask

    Returns the current TrStringTask instance for method chaining.

    | Edit this page View Source

    BuildFinalKey(string)

    Declaration
    protected override string BuildFinalKey(string table)
    Parameters
    Type Name Description
    string table
    Returns
    Type Description
    string
    Overrides
    TrTask<TrStringTask, string>.BuildFinalKey(string)
    | Edit this page View Source

    C(int)

    Sets the pluralization count for the localized string. Shorthand for Count(int).

    Declaration
    public TrStringTask C(int count)
    Parameters
    Type Name Description
    int count

    Pluralization count (e.g., 3 => "3 apples").

    Returns
    Type Description
    TrStringTask

    Returns the current TrStringTask instance for method chaining.

    | Edit this page View Source

    Count(int)

    Pluralization count for the localized string. (e.g, 3 => "3 apples")

    Declaration
    public TrStringTask Count(int count)
    Parameters
    Type Name Description
    int count

    Pluralization count.

    Returns
    Type Description
    TrStringTask

    The fluent localization asset.

    | Edit this page View Source

    Enum<TEnum>(TEnum)

    Declaration
    public static TrStringTask Enum<TEnum>(TEnum @enum) where TEnum : struct, Enum
    Parameters
    Type Name Description
    TEnum enum
    Returns
    Type Description
    TrStringTask
    Type Parameters
    Name Description
    TEnum
    | Edit this page View Source

    F()

    Sets the grammatical gender to Feminine. Shorthand for Gender(TextGender) with Feminine.

    Declaration
    public TrStringTask F()
    Returns
    Type Description
    TrStringTask

    Returns the current TrStringTask instance for method chaining.

    | Edit this page View Source

    Format(params string[])

    Sets additional format arguments for SmartFormat or string interpolation. (e.g., "Hello, {0}! You have {1} apples.")

    Declaration
    public TrStringTask Format(params string[] args)
    Parameters
    Type Name Description
    string[] args

    An array of format arguments.

    Returns
    Type Description
    TrStringTask

    The fluent localization asset.

    | Edit this page View Source

    Gender(TextGender)

    Specifies the grammatical gender for localization. Useful for languages that use gendered forms (e.g., amigo/amiga).

    Declaration
    public TrStringTask Gender(TextGender gender)
    Parameters
    Type Name Description
    TextGender gender

    The grammatical gender to use.

    Returns
    Type Description
    TrStringTask

    The fluent localization asset.

    | Edit this page View Source

    Long()

    Sets the text format to Long. Shorthand for TextFormat(TextFormat) with Long.

    Declaration
    public TrStringTask Long()
    Returns
    Type Description
    TrStringTask

    Returns the current TrStringTask instance for method chaining.

    | Edit this page View Source

    M()

    Sets the grammatical gender to Masculine. Shorthand for Gender(TextGender) with Masculine.

    Declaration
    public TrStringTask M()
    Returns
    Type Description
    TrStringTask

    Returns the current TrStringTask instance for method chaining.

    | Edit this page View Source

    N()

    Sets the grammatical gender to Neuter. Shorthand for Gender(TextGender) with Neuter.

    Declaration
    public TrStringTask N()
    Returns
    Type Description
    TrStringTask

    Returns the current TrStringTask instance for method chaining.

    | Edit this page View Source

    ProcessValue(string)

    Declaration
    protected override string ProcessValue(string raw)
    Parameters
    Type Name Description
    string raw
    Returns
    Type Description
    string
    Overrides
    TrTask<TrStringTask, string>.ProcessValue(string)
    | Edit this page View Source

    Short()

    Sets the text format to Short. Shorthand for TextFormat(TextFormat) with Short.

    Declaration
    public TrStringTask Short()
    Returns
    Type Description
    TrStringTask

    Returns the current TrStringTask instance for method chaining.

    | Edit this page View Source

    TextFormat(TextFormat)

    Specifies the text format (e.g., Abbreviated, Short, Long). Useful for date/time, unit, or label formatting.

    Declaration
    public TrStringTask TextFormat(TextFormat format)
    Parameters
    Type Name Description
    TextFormat format

    The desired text format.

    Returns
    Type Description
    TrStringTask

    The fluent localization asset.

    | Edit this page View Source

    TryGetValue(string, string, out string)

    Declaration
    protected override bool TryGetValue(string table, string key, out string value)
    Parameters
    Type Name Description
    string table
    string key
    string value
    Returns
    Type Description
    bool
    Overrides
    TrTask<TrStringTask, string>.TryGetValue(string, string, out string)
    | Edit this page View Source

    ValidateValue(string)

    Declaration
    protected override bool ValidateValue(string value)
    Parameters
    Type Name Description
    string value
    Returns
    Type Description
    bool
    Overrides
    TrTask<TrStringTask, string>.ValidateValue(string)

    Operators

    | Edit this page View Source

    implicit operator string(TrStringTask)

    Implicitly converts a TrStringTask to a string by retrieving its localized value.

    Declaration
    public static implicit operator string(TrStringTask task)
    Parameters
    Type Name Description
    TrStringTask task

    The TrStringTask to convert.

    Returns
    Type Description
    string

    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