Interface type
Reuse interface (Transient, Singleton)
Object of InstanceProvider class to register in container
A string which allows to get instances by its name
1 interface MyInterface{}; 2 class MyClass: MyInterface{}; 3 4 auto container = new Container(); 5 auto myClassInstance = new InstanceProvider(new MyClass()); 6 container.register!(MyInterface)(myClassInstance, "My best class");
Register reuse objects through InstanceProvider specifying its name