Class HudArgumentParser
Turns an authored constant argument, stored as text, into the value a bound method expects.
Inherited Members
Namespace: Serenity.GameUi.Application.Binding
Assembly: Serenity.GameUi.Application.dll
Syntax
public static class HudArgumentParser
Remarks
HUD bindings call methods like GetSnapshot("pistol") or GetTimer("stage"), so the wizard
stores each argument as a string next to its parameter type and this converts it back at compile time.
Serenity wraps many of those keys in single-field value objects (WeaponId, ScoreKey,
CharacterId), so a converting constructor is tried before giving up.
Methods
TryParse(string, Type, out object)
Attempts to convert text into targetType.
Declaration
public static bool TryParse(string text, Type targetType, out object value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | text | The authored value, as text. |
| Type | targetType | The parameter type to produce. |
| object | value | The converted value, when conversion succeeded. |
Returns
| Type | Description |
|---|---|
| bool | True when the value could be produced. |