CallbackFactoryAnnotation.factoryContainer

Constructs a factory that uses delegate to instantiate an aggregate of type T.

struct CallbackFactoryAnnotation(Z, Dg, Args...)
factoryContainer
(
T
string p = ""
)
if (
is(Z : T)
)
if (
(
is(Dg == Z delegate
(,
Args
)
) ||
is(Dg == Z function
(,
Args
)
)
)
)

Parameters

T

the aggregate type

locator Locator!()

locator used to extract needed dependencies for T, it is also passed to delegate as first argument.

Return Value

Type: InstanceFactory!T

InstanceFactory!T for objects InstanceFactory!(Wrapper!T) for structs

Meta