Class TrTask<TSelf, TValue>
Inheritance
TrTask<TSelf, TValue>
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
Properties
|
Edit this page
View Source
Key
Declaration
protected string Key { get; }
Property Value
|
Edit this page
View Source
Table
Declaration
protected string Table { get; }
Property Value
|
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
Methods
|
Edit this page
View Source
BuildFinalKey(string)
Declaration
protected virtual string BuildFinalKey(string table)
Parameters
| Type |
Name |
Description |
| string |
table |
|
Returns
|
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
Returns
|
Edit this page
View Source
ProcessValue(TValue)
Declaration
protected virtual TValue ProcessValue(TValue raw)
Parameters
| Type |
Name |
Description |
| TValue |
raw |
|
Returns
|
Edit this page
View Source
TryGetValue(string, string, out TValue)
Declaration
protected abstract bool TryGetValue(string table, string key, out TValue value)
Parameters
Returns
|
Edit this page
View Source
ValidateValue(TValue)
Declaration
protected virtual bool ValidateValue(TValue v)
Parameters
| Type |
Name |
Description |
| TValue |
v |
|
Returns
Extension Methods