Table of Contents

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

T

The type of input object that provides context data.

Extension Methods

Properties

Parser

The parser instance used for expression parsing.

IParser Parser { get; }

Property Value

IParser

Methods

GetValue(string, T)

Retrieves the value of a named variable from the input context.

object GetValue(string name, T input)

Parameters

name string

The variable name to resolve.

input T

The 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

name string

The variable name to resolve.

input T

The input object containing context data.

Returns

Task<object>

A task containing the resolved variable value.

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

name string

The variable name to resolve.

input T

The input object containing context data.

data object

When this method returns, contains the resolved variable value if found; otherwise, null.

Returns

bool

True if the variable was found and resolved; otherwise, false.