Skip to content

Compono.ICompositionContext.Resolve

Compono

Compono.ICompositionContext

ICompositionContext.Resolve Method

Overloads
Resolve<TValue>() Resolves a value of type TValue from inside a registration or configuration-rule factory, or a public TryProvide(CompositionProviderRequest, ICompositionContext) invocation - the hand-written counterpart to Resolve<TValue>(CompositionRequestDescriptor), which only generated code calls. Only valid while one of those three is actively being invoked.
Resolve<TValue>(CompositionRequestDescriptor) Resolves a value of type TValue for one constructor parameter or required member.

ICompositionContext.Resolve\<TValue>() Method

Resolves a value of type TValue from inside a registration or configuration-rule factory, or a public TryProvide(CompositionProviderRequest, ICompositionContext) invocation - the hand-written counterpart to Resolve<TValue>(CompositionRequestDescriptor), which only generated code calls. Only valid while one of those three is actively being invoked.

TValue Resolve<TValue>();

Type parameters

TValue

The requested value's type.

Returns

TValue

Exceptions

System.InvalidOperationException
No registration/configuration-rule factory or public provider invocation is currently in progress.

CompositionException
No explicit value, shared value, registration, provider, or generated plan could satisfy the request.

ICompositionContext.Resolve\<TValue>(CompositionRequestDescriptor) Method

Resolves a value of type TValue for one constructor parameter or required member.

TValue Resolve<TValue>(in Compono.CompositionRequestDescriptor descriptor);

Type parameters

TValue

The requested value's type.

Parameters

descriptor CompositionRequestDescriptor

The compact, compile-time-constructed request metadata.

Returns

TValue

Exceptions

CompositionException
No explicit value, shared value, registration, provider, or generated plan could satisfy the request.