DI

Dependency Injection

This is the flagship class of the framework.

Constructors

this
this(DIContainer container)
this
this()

Members

Functions

makeNew
T makeNew()

Instantiates a new instance of the specified type T.

register
void register(T value)

Stores the provided instance of type T in the DI container. This registered instance will be injected for dependencies of type T.

registerInterface
void registerInterface(TClass value)
void registerInterface()

Stores the provided instance of type TClass in the DI container to be injected for dependencies of both types TInterface and TClass later.

resolve
T resolve()
T* resolve()

Returns the singleton instance of the requested type.

Meta