ActionEngineUtilResolveExpressionVariablesTAction, TCollection Method

Resolve the variable references in the caller's expression and return the resolved value.

Definition

Namespace: ActionEngine
Assembly: ActionEngine (in ActionEngine.dll) Version: 26.2117.4453
C#
public static string ResolveExpressionVariables<TAction, TCollection>(
	string expression,
	TAction action
)
where TAction : ActionItemBase<TAction, TCollection>
where TCollection : new(), ActionCollectionBase<TAction, TCollection>

Parameters

expression  String
The expression that might contain variable references in interpolated string syntax such as {VariableName}.
action  TAction
Reference to the implemented ActionBase derivative.

Type Parameters

TAction
The implemented action type for which the variables will be resolved.
TCollection
The implemented action collection type for which the variables will be resolved.

Return Value

String
The expression, as it appears with all interpolated variable references resolved.

Remarks

Technically, this method would be better suited for placement within the ActionItemBase class, to avoid such a terse signature pattern. However, it is important to be able to remember how to use this kind of signature pattern externally. As a result, this method serves as an example of how to generically service a generic CRTP class externally.

See Also