Struct DynamicValue<T>

Namespace: redb.Route.Core
Assembly: redb.Route.dll

A value that is either static (resolved at endpoint creation)
or dynamic (resolved per-message from exchange via ${...} expressions).
The property type itself is the contract: DynamicValue{T} = "may be an expression".

public readonly struct DynamicValue<T>

Properties

IsDynamic

Whether this value contains a dynamic expression.

public bool IsDynamic { get; }

Methods

FromExpression(Func<IExchange, T?>)

Creates a dynamic value from a compiled expression resolver.

public static DynamicValue<T> FromExpression(Func<IExchange, T?> resolver)

FromExpression(IExpression)

Creates a dynamic value from an .

public static DynamicValue<T> FromExpression(IExpression expression)

FromStatic(T)

Creates a static (constant) value.

public static DynamicValue<T> FromStatic(T value)

Resolve(IExchange)

Resolves the value. Static = instant return, dynamic = evaluates compiled expression.

public T? Resolve(IExchange exchange)

ToString()

Returns the fully qualified type name of this instance.

public override string ToString()