ActionMarker
public readonly struct ActionMarkerParsed action data from text markup. Immutable once created.
Fields
Section titled “Fields”
actionId
Section titled “actionId”public readonly string actionIdReturns
System.String
sourceIndex
Section titled “sourceIndex”public readonly int sourceIndexReturns
System.Int32
parameters
Section titled “parameters”public readonly string[] parametersReturns
System.String[]
TagParameters
Section titled “TagParameters”public readonly TextStudioTagParameters TagParametersReturns
TextStudio.TextStudioTagParameters
Constructors
Section titled “Constructors”
ActionMarker(string, int, string[])
Section titled “ActionMarker(string, int, string[])”public ActionMarker(string actionId, int sourceIndex, string[] parameters)Creates a marker from positional parameters.
Parameters
| Name | Type |
|---|---|
actionId |
System.String |
sourceIndex |
System.Int32 |
parameters |
System.String[] |
ActionMarker(string, int, string[], TextStudioTagParameters)
Section titled “ActionMarker(string, int, string[], TextStudioTagParameters)”public ActionMarker(string actionId, int sourceIndex, string[] parameters, TextStudioTagParameters tagParameters)Creates a marker with positional values and parsed named parameters.
Parameters
| Name | Type |
|---|---|
actionId |
System.String |
sourceIndex |
System.Int32 |
parameters |
System.String[] |
tagParameters |
TextStudio.TextStudioTagParameters |
Methods
Section titled “Methods”
TryGetFloat(int, out float)
Section titled “TryGetFloat(int, out float)”public bool TryGetFloat(int paramIndex, out float value)Tries to parse a positional parameter as an invariant floating-point value.
Parameters
| Name | Type |
|---|---|
paramIndex |
System.Int32 |
value |
System.Single |
Returns
System.Boolean
TryGetFloat(string, int, out float)
Section titled “TryGetFloat(string, int, out float)”public bool TryGetFloat(string name, int positionalIndex, out float value)Tries a named floating-point parameter, then falls back to a positional index.
Parameters
| Name | Type |
|---|---|
name |
System.String |
positionalIndex |
System.Int32 |
value |
System.Single |
Returns
System.Boolean
GetFloat(string, int, float)
Section titled “GetFloat(string, int, float)”public float GetFloat(string name, int positionalIndex, float defaultValue)Gets a named or positional floating-point parameter, or the supplied fallback.
Parameters
| Name | Type |
|---|---|
name |
System.String |
positionalIndex |
System.Int32 |
defaultValue |
System.Single |
Returns
System.Single
GetString(int, string)
Section titled “GetString(int, string)”public string GetString(int paramIndex, string defaultValue = "")Gets a positional string or the supplied fallback.
Parameters
| Name | Type |
|---|---|
paramIndex |
System.Int32 |
defaultValue |
System.String |
Returns
System.String
GetString(string, int, string)
Section titled “GetString(string, int, string)”public string GetString(string name, int positionalIndex, string defaultValue = "")Gets a named string, then a positional string, then the supplied fallback.
Parameters
| Name | Type |
|---|---|
name |
System.String |
positionalIndex |
System.Int32 |
defaultValue |
System.String |
Returns
System.String