Interface IExecutionContext<T>
- Namespace
- Albatross.Expression.Context
- Assembly
- Albatross.Expression.dll
Provides execution context for evaluating expressions with variable resolution.
public interface IExecutionContext<in T>
Type Parameters
TThe type of input object that provides context data.
- Extension Methods
Properties
Parser
The parser instance used for expression parsing.
IParser Parser { get; }
Property Value
Methods
GetValue(string, T)
Retrieves the value of a named variable from the input context.
object GetValue(string name, T input)
Parameters
namestringThe variable name to resolve.
inputTThe input object containing context data.
Returns
- object
The resolved variable value.
GetValueAsync(string, T)
Asynchronously retrieves the value of a named variable from the input context.
Task<object> GetValueAsync(string name, T input)
Parameters
namestringThe variable name to resolve.
inputTThe input object containing context data.
Returns
TryGetValue(string, T, out object?)
Attempts to retrieve the value of a named variable from the input context.
bool TryGetValue(string name, T input, out object? data)
Parameters
namestringThe variable name to resolve.
inputTThe input object containing context data.
dataobjectWhen this method returns, contains the resolved variable value if found; otherwise, null.
Returns
- bool
True if the variable was found and resolved; otherwise, false.