callback - multiple declarations

Function callback

Construct component using a delegate.

auto auto callback(Z, T, Args...) (
  Z factory,
  T delegate(Locator!(), Args) dg,
  auto ref Args args
);

auto auto callback(Z, T, Args...) (
  Z factory,
  T function(Locator!(), Args) dg,
  auto ref Args args
);

Constructs component using a delegate, and a list of arguments passed to delegate.

Parameters

NameDescription
factory the factory which will use delegate to construct component.
dg the delegate that is responsible for creating component, given a list of arguments.
args the arguments that will be used by delegate to construct component.

Returns

Z.

Function callback

Call dg on an component that is in configuration phase.

auto auto callback(Z, T, Args...) (
  Z factory,
  void delegate(Locator!(), T, Args) dg,
  auto ref Args args
);

auto auto callback(Z, T, Args...) (
  Z factory,
  void function(Locator!(), T, Args) dg,
  auto ref Args args
);

auto auto callback(Z, T, Args...) (
  Z factory,
  void delegate(Locator!(), ref T, Args) dg,
  auto ref Args args
);

auto auto callback(Z, T, Args...) (
  Z factory,
  void function(Locator!(), ref T, Args) dg,
  auto ref Args args
);

Call dg on component to perform some modifications, using args as input.

Parameters

NameDescription
factory factory which will call dg with args.
dg delegate that will perform some modifications on component using passed args.
args a list of arguments passed to dg.

Returns

Z