Injector

A static class containing functions to easily construct objects with Dependency Injection, or execute functions where their parameters are injected via Dependency Injection.

Members

Enums

isBuiltinCtor
eponymoustemplate isBuiltinCtor(alias F)
Undocumented in source.
isStaticFuncCtor
eponymoustemplate isStaticFuncCtor(alias F)
Undocumented in source.

Static functions

NoValidCtor
void NoValidCtor()

FindCtor will evaluate to this no-op function if it can't find a proper ctor.

construct
T construct(ServiceScope services)

Constructs a class or struct via Dependency Injection.

execute
ReturnType!F execute(ServiceScope services, F func)

Executes a function where all of its parameters are retrieved from the given ServiceScope.

Templates

FindCtor
template FindCtor(T)

Finds the most appropriate ctor for use with injection.

Meta