ClassProvider

A Provider that instantiates instances of a class.

Arguments to the constructor are resolved using a Resolver (typically a Container). If an Injectable annotation is on the class, then the template arguments to the Injectable determine how the injected arguments should be resolved. Otherwise, the argument types for the first constructor are used.

Constructors

this
this(DependencyContainer container)

Main constructor

Members

Functions

canSingleton
bool canSingleton()

Return maybe singleton provider

originalProvider
Provider originalProvider()

Return original provider

providedType
TypeInfo providedType()

Return a TypeInfo describing the type provided.

registeredType
TypeInfo registeredType()

Return a TypeInfo describing the type registered.

withProvided
void withProvided(bool injectInstance, void delegate(void*) @(safe) dg)

Produce the value. A pointer to the value is passed to a delegate.

Inherited Members

From Provider

providedType
TypeInfo providedType()

Return a TypeInfo describing the type provided.

registeredType
TypeInfo registeredType()

Return a TypeInfo describing the type registered.

withProvided
void withProvided(bool injectInstance, void delegate(void*) @(safe) dg)

Produce the value. A pointer to the value is passed to a delegate.

canSingleton
bool canSingleton()

Return maybe singleton provider

originalProvider
Provider originalProvider()

Return original provider

Meta