Container.register

Register a Class.

Instances are provided using a ClassProvider that injects dependencies using this container.

  1. void register(Flag!"asSingleton" asSingleton)
  2. void register(string name, Flag!"asSingleton" asSingleton)
    interface Container
    final
    void
    register
    (
    I
    C : I = I
    )
    (
    string name
    ,
    Flag!"asSingleton" asSingleton = Yes.asSingleton
    )
    if (
    is(C == class)
    )
  3. void addProvider(TypeInfo type, Provider provider)
  4. void addProvider(TypeInfo type, string name, Provider provider)

Meta