Skip to content

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.

public Compono.CompositionBuilder Use(System.Func<Compono.ICompositionContext,T> factory);

Parameters

factory System.Func<ICompositionContext,T>

Produces the rule's value, given the resolving context.

Returns

CompositionBuilder

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.

public Compono.CompositionBuilder Use(T value);

Parameters

value T

The value this rule always produces.

Returns

CompositionBuilder