Skip to content

ActionMarker

StructTextStudioTextStudio
public readonly struct ActionMarker

Parsed action data from text markup. Immutable once created.

public readonly string actionId

Returns

System.String

public readonly int sourceIndex

Returns

System.Int32

public readonly string[] parameters

Returns

System.String[]

public readonly TextStudioTagParameters TagParameters

Returns

TextStudio.TextStudioTagParameters

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

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

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

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

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

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