Table of Contents

Class VariableBuildingContext

Namespace
Fluxzy.Rules
Assembly
Fluxzy.Core.dll

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

exchangeContext ExchangeContext
exchange Exchange
connection Connection
filterScope FilterScope

Properties

Connection

public Connection? Connection { get; }

Property Value

Connection

Exchange

public Exchange? Exchange { get; }

Property Value

Exchange

ExchangeContext

public ExchangeContext ExchangeContext { get; }

Property Value

ExchangeContext

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

name string
value string

Returns

bool

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.