Function constructorBasedFactory

Instantiates component using it's constructor with args.

auto auto constructorBasedFactory(T, Args...) (
  auto ref Args args
);

Encapsulates construction of component using a constructor, with args. Arguments from argument list that are RuntimeReferences, are automatically replaced with component extracted from locator.

Parameters

NameDescription
T component type
Args type tuple of args that are passed to T's constructor