Skip to content

Compono.ProviderAttempt

Compono

Compono

ProviderAttempt Struct

One resolution-pipeline stage tried for one composition request, and what it resulted in.

public readonly record struct ProviderAttempt : System.IEquatable<Compono.ProviderAttempt>

Implements System.IEquatable<ProviderAttempt>

Remarks

Deliberately compact - per docs/adr/0010-composition-request-pipeline-and-diagnostics-tracing.md's trace-buffer design: Compono.CompositionTraceBuffer appends one of these per stage tried and rewinds on success, so this type has to be cheap enough to append without threatening the allocation-free success path. Provider is a plain System.Type reference, not a runtime reflection *operation* - identical in kind to PlanCache<T>'s own closed-generic-`Type` identity and the active-construction-frame stack's `Type`-keyed lookup, both already established elsewhere in this engine. See docs/adr/0016-provider-identity-restored-in-provider-attempt.md for why this field exists at all - Compono.Providers.BuiltInProviders.Default already registers three providers in stage 7 today, not a hypothetical future case, so the trace needs a way to tell them apart (supersedes docs/adr/0015-provider-identity-deferred-in-provider-attempt.md's deferral, which rested on a premise that was already false when written).

Constructors
ProviderAttempt(PipelineStage, Type, CompositionAttemptOutcome) One resolution-pipeline stage tried for one composition request, and what it resulted in.
Properties
Outcome What the stage resulted in.
Provider The concrete Compono.ICompositionProvider type that made this attempt, or null for a context-owned stage (shared/scoped values, exact registrations, collection-plan/generated-plan dispatch) - those aren't Compono.ICompositionProvider instances at all, per docs/architecture.md's Resolution Pipeline table.
Stage Which pipeline stage this attempt was for.