DefferredConstructionContext.register - multiple declarations

Function DefferredConstructionContext.register

Register a component of type T by identity, type, or interface it implements.

ConfigurationContextFactory!T register(T) (
  string identity
);

ConfigurationContextFactory!T register(T) ();

ConfigurationContextFactory!T register(Interface, T) ()
if (!is(T == Interface));

Register a component of type T by identity, type, or interface it implements.

Parameters

NameDescription
Interface interface of registered component that it implements
T type of registered component
identity identity by which component is stored in storage

Returns

GenericFactory!T factory for component for further configuration

Function DefferredConstructionContext.register

Register a component of type T by identity, type, or interface it implements with a default value.

ConfigurationContextFactory!T register(T) (
  auto ref T value,
  string identity
);

ConfigurationContextFactory!T register(T) (
  auto ref T value
)
if (!is(T == string));

ConfigurationContextFactory!T register(Interface, T) (
  auto ref T value
)
if (!is(T == Interface));

Register a component of type T by identity, type, or interface it implements with a default value.

Parameters

NameDescription
Interface interface of registered component that it implements
T type of registered component
identity identity by which component is stored in storage
value initial value of component;

Returns

GenericFactory!T factory for component for further configuration