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.
Type parameters¶
TValue
The requested value's type.
Returns¶
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.
Type parameters¶
TValue
The requested value's type.
Parameters¶
descriptor CompositionRequestDescriptor
The compact, compile-time-constructed request metadata.
Returns¶
Exceptions¶
CompositionException
No explicit value, shared value, registration, provider, or generated plan could satisfy the request.