Interface type
Instance as an interface type
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) 7 auto myClass = container.get!(MyInterface)();
Get reuse objects by its class