CallbackFactory

Instantiates data of type T using a delegate or function.

Encapsulates data's construction logic using a delegate. The algorithm uses a delegate to create required data, with a set of Args that are passed to delegate, and a locator for dependency fetching.

class CallbackFactory : ParameterHolder!Args, InstanceFactory!T(
T
Dg
Args...
) if (
(
is(Dg == T delegate
(
Locator!()
,
Args
)
) ||
is(Dg == T function
(
Locator!()
,
Args
)
)
)
) {}

Constructors

this
this(Dg dg, Args args)
Undocumented in source.

Members

Functions

factory
T factory()

See InstanceFactory interface

Parameters

T

the constructed aggregate

Args

type tuple of arguments passed to delegate for aggregate's construction.

Meta