Struct RegistrationContext

A component registration interface for storage.

struct RegistrationContext(alias ObjectWrappingFactory) ;

Registration context registers components into storage, and uses a locator as a source of dependencies for components.

Constructors

NameDescription
this Constructor for RegistrationContext

Fields

NameTypeDescription
allocator IAllocatorAllocator used for registered components.
locator Locator!(Object,string)Locator used for fetching components dependencies;
storage Storage!(ObjectFactory,string)Storage into which to store components;

Methods

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

Parameters

NameDescription
ObjectWrappingFactory factory used to wrap components that are not derived from Object.