ServiceInfo.asTemplated

An internal function, public due to necessity, however will be used to explain the asXXX functions.

e.g. asSingleton, asTransient, and asScoped.

Notes: This constructor is able to automatically generate the list of dependencies, which will allow ServiceProvider to check for dependency loops.

If factory is null, then the factory becomes a call to Injector.construct!ImplType, which should be fine for most cases.

struct ServiceInfo
@safe nothrow pure static
asTemplated
(
ServiceLifetime Lifetime
alias BaseType
alias ImplType
)
(
FactoryFuncFor!ImplType factory = null
)
if (
isValidBaseType!BaseType &&
isValidImplType!(BaseType, ImplType)
)

Meta