Function SetterAnnotation.factoryConfigurer

Constructs a configurer that will call or set a member for aggregate of type T.

PropertyConfigurer!T factoryConfigurer(T, string method) (
  Locator!() locator
)
if (!isField!(T, method));

PropertyConfigurer!T factoryConfigurer(T, string method) (
  Locator!() locator
)
if (isField!(T, method) && Args.length == 1);

Constructs a configurer that will call or set a member for aggregate of type T. In case when member is a method, it will be called with passed arguments. If method is an overload set, the method that matches argument list will be called. In case when member is a field, it will be set to first argument from Args list.

Parameters

NameDescription
T the aggregate type
method the member which setter will call or set.
locator locator used to extract needed dependencies for T

Returns

PropertyConfigurer!T for objects PropertyConfigurer!(Wrapper!T) for structs