Skip to content

Compono.Composer.Create

Compono

Compono.Composer

Composer.Create Method

Overloads
Create() Creates a new Composer with no explicit configuration - equivalent to Create(Action<CompositionBuilder>) with an empty callback.
Create(Action<CompositionBuilder>) Creates a new Composer from an explicit configuration callback.
Create<T>() Composes an instance of T - a new root composition operation, with its own scope and path, resolved through the same pipeline as any nested request.

Composer.Create() Method

Creates a new Composer with no explicit configuration - equivalent to Create(Action<CompositionBuilder>) with an empty callback.

public static Compono.Composer Create();

Returns

Composer

Composer.Create(Action\<CompositionBuilder>) Method

Creates a new Composer from an explicit configuration callback.

public static Compono.Composer Create(System.Action<Compono.CompositionBuilder> configure);

Parameters

configure System.Action<CompositionBuilder>

Configures the new composer's CompositionBuilder. Runs synchronously, exactly once, before this method returns.

Returns

Composer

Exceptions

System.ArgumentNullException
configure is null.

CompositionConfigurationException
The accumulated configuration has one or more conflicts (e.g. WithSeed called more than once).

Composer.Create\<T>() Method

Composes an instance of T - a new root composition operation, with its own scope and path, resolved through the same pipeline as any nested request.

public T Create<T>();

Type parameters

T

The type to compose.

Returns

T

Exceptions

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