Class VariableBuildingContext
Per-exchange bundle of objects that feed built-in ${...} variable
evaluation. Resolved by EvaluateVariable(string, VariableBuildingContext?) via
TryEvaluate(string, out string); custom variables go through
Set(string, string) instead of this class.
public class VariableBuildingContext
- Inheritance
-
VariableBuildingContext
- Inherited Members
Constructors
VariableBuildingContext(ExchangeContext, Exchange?, Connection?, FilterScope)
public VariableBuildingContext(ExchangeContext exchangeContext, Exchange? exchange, Connection? connection, FilterScope filterScope)
Parameters
exchangeContextExchangeContextexchangeExchangeconnectionConnectionfilterScopeFilterScope
Properties
Connection
public Connection? Connection { get; }
Property Value
Exchange
public Exchange? Exchange { get; }
Property Value
ExchangeContext
public ExchangeContext ExchangeContext { get; }
Property Value
Methods
TryEvaluate(string, out string)
Evaluates a built-in variable name (e.g. authority.host,
exchange.url). Returns false for unknown names — callers
should then consult VariableContext for user-set and
environment variables.
public bool TryEvaluate(string name, out string value)
Parameters
Returns
Remarks
Allocation-free on the hot path. This replaced an older
IDictionary<string, Func<string>> surface that
allocated ~1 KB per rule evaluation (dictionary + nine closures) and
accounted for 6–12% of bytes in the throughput benchmark.