callbackFactory

Instantiates component of type T using a delegate or function.

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

  1. auto callbackFactory(T delegate(RCIAllocator, Locator!(), Args) dg, Args args)
    callbackFactory
    (
    T
    Args...
    )
    (
    T delegate
    (
    RCIAllocator
    ,,
    Args
    )
    dg
    ,
    auto ref Args args
    )
  2. auto callbackFactory(T function(RCIAllocator, Locator!(), Args) dg, Args args)
  3. class CallbackFactory(T, Dg, Args...)

Parameters

T

the constructed component

Args

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

Meta