Class VariableEvaluationHelper
Helper for evaluating variables in a string. The default syntax of a variable is ${variableName}
public static class VariableEvaluationHelper
- Inheritance
-
VariableEvaluationHelper
- Inherited Members
Methods
DoesNotContainsCapturedRegex(ReadOnlySpan<char>)
Fast non reliable check if an input contains a named captured regex.
public static bool DoesNotContainsCapturedRegex(this ReadOnlySpan<char> input)
Parameters
input
ReadOnlySpan<char>
Returns
DoesNotContainsVariable(ReadOnlySpan<char>)
This is a fast method to check if a string may contain a variable. It's to avoid the cost of parsing the string with regex if it doesn't contain any variable.
public static bool DoesNotContainsVariable(this ReadOnlySpan<char> input)
Parameters
input
ReadOnlySpan<char>
Returns
EvaluateVariable(string?, ExchangeContext?)
public static string? EvaluateVariable(this string? str, ExchangeContext? exchangeContext)
Parameters
str
stringexchangeContext
ExchangeContext