Skip to content

Compono.ICompositionValueProvider

Compono

Compono

ICompositionValueProvider Interface

A public extension point for pipeline stage 5 (semantic value providers) or stage 6 (test-double providers) - open-ended, pattern-matching composition logic a closed-set .For<T>() rule can't express ("any interface type," "any member named Email"). Registered via AddSemanticProvider(ICompositionValueProvider) or AddTestDoubleProvider(ICompositionValueProvider) - which method an integration's own UseX() extension calls decides which stage a given instance participates in; the interface itself is not stage-specific. See docs/adr/0024-public-provider-extensibility-model.md.

public interface ICompositionValueProvider

Remarks

An implementation must be safe to invoke repeatedly, including concurrently, once constructed - a Composer's configuration (and every provider registered into it) is immutable and reused across every composition call it ever serves, exactly like every other builder-compiled piece of configuration (a .For<T>() rule, a registration factory).

Methods
TryProvide(CompositionProviderRequest, ICompositionContext) Attempts to produce a value for request. Returns NotHandled for any request this provider doesn't apply to, so a later provider or pipeline stage still gets a chance - never throws for an expected non-match.