Class CallbackFactory

Instantiates data of type T using a delegate or function.

class CallbackFactory(T, Dg, Args...)
  
if (is(Dg == T delegate(Locator!(), Args)) || is(Dg == T function(Locator!(), Args)));

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.

Constructors

NameDescription
thisConstructor for CallbackFactory!(T, Dg, Args)

Methods

NameDescription
factorySee InstanceFactory interface

Parameters

NameDescription
T the constructed aggregate
Args type tuple of arguments passed to delegate for aggregate's construction.