CallbackConfigurer

Configures/modifies data of type T with help of a delegate or function.

Encapsulates data configuration logic using a delegate. The algorithm calls delegate, with a locator, a set of Args, and configured data, in order to modify the data somehow.

Note: If data is not a reference type it is recommended to pass it by reference in order to avoid receiving of a copy and not original one in delegate.

class CallbackConfigurer : ParameterHolder!Args, PropertyConfigurer!T(
T
Dg
Args...
) if (
is(Dg == void delegate
(
Locator!()
,
T
,
Args
)
) ||
is(Dg == void function
(
Locator!()
,
T
,
Args
)
)
||
is(Dg == void delegate
(
Locator!()
,
ref T
,
Args
)
)
||
is(Dg == void function
(
Locator!()
,
ref T
,
Args
)
)
) {}

Constructors

this
this(Dg dg, Args args)

See InstanceFactory interface

Members

Functions

configure
void configure(T object)
Undocumented in source. Be warned that the author may not have intended to support it.

Parameters

T

the aggregate

Args

type tuple of arguments used by delegate for customization.

Meta