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.

class ClassProvider : Provider (
T
) if (
is(T == class)
) {}

Inherited Members

From Provider

withProvided
void withProvided(void delegate(void*) dg)

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

provide
T provide()

Provied the value. T must be the same type represented by the TypeInfo returned by providedType.

providedType
TypeInfo providedType [@property getter]

Return a TypeInfo describing the type provided.

Meta