Compono.CompositionTypeRuleBuilder T .Use
Compono¶
Compono.CompositionTypeRuleBuilder<T>¶
CompositionTypeRuleBuilder\<T>.Use Method¶
| Overloads | |
|---|---|
| Use(Func<ICompositionContext,T>) | Registers a type rule whose value is produced by factory - matches any stage-4 request for exactly T, regardless of which member/position requested it. |
| Use(T) | Registers a type rule that always produces value - matches any stage-4 request for exactly T, regardless of which member/position requested it. |
CompositionTypeRuleBuilder\<T>.Use(Func\<ICompositionContext,T>) Method¶
Registers a type rule whose value is produced by factory - matches any stage-4 request for exactly T, regardless of which member/position requested it.
Parameters¶
factory System.Func<ICompositionContext,T>
Produces the rule's value, given the resolving context.
Returns¶
CompositionTypeRuleBuilder\<T>.Use(T) Method¶
Registers a type rule that always produces value - matches any stage-4 request for exactly T, regardless of which member/position requested it.
Parameters¶
value T
The value this rule always produces.