registerInto - multiple declarations

Function registerInto

Register an object into a storage by storageId located in storageLocator.

auto deprecated auto registerInto(Type, R) (
  R storageLocator,
  Locator!() locator,
  string storageId = "singleton"
)
if (!is(R : Storage!(ObjectFactory, string)));

auto deprecated auto registerInto(Type, R) (
  R locator,
  string storageId = "singleton"
)
if (!is(R : Storage!(ObjectFactory, string)));

Parameters

NameDescription
Type the type of object registered in storage
storageLocator locator containing the storage where to store object.
locator locator used to fetch dependencies for registered object
id the id of object registered in storage
storageId the id of storage where object is stored.

Throws

NotFoundException when storage with storageId is not found.

Returns

storageLocator for further configuration

Function registerInto

Register component into an object storage located in locator by storageId.

auto deprecated auto registerInto(Type, R) (
  R locator,
  Type data,
  string storageId = "parameters"
)
if (!is(R : Storage!(Object, string)));

Parameters

NameDescription
Type the type of object registered in storage
locator locator containing object storage were component is saved.
data the actual component saved in storage
id the id by which component will be identified
storageId identity of storage in locator