RegistrationContext.register

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

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

  1. ConfigurableFactoryType!T register(string identity)
  2. ConfigurableFactoryType!T register()
  3. ConfigurableFactoryType!T register()
  4. ConfigurableFactoryType!T register(T value, string identity)
  5. ConfigurableFactoryType!T register(T value)
  6. ConfigurableFactoryType!T register(T value)
    struct RegistrationContext(Policies...)
    register
    (
    Interface
    T : Interface
    string file = __FILE__
    size_t line = __LINE__
    )
    (
    auto ref T value
    )
    if (
    !is(T == Interface)
    )
    if (
    Policies.length > 1
    )

Parameters

Interface

interface of registered component that it implements

T

type of registered component

value T

initial value of component;

Return Value

Type: ConfigurableFactoryType!T

GenericFactory!T factory for component for further configuration

Meta