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)

Constructor for CallbackConfigurer!(T, Dg, Args)

Members

Functions

configure
void configure(T object)

Accepts a reference to an object that is to be configured by the configurer.

Parameters

T

the aggregate

Args

type tuple of arguments used by delegate for customization.

Meta