diff --git a/README.md b/README.md index e6f0bc7..73c2608 100644 --- a/README.md +++ b/README.md @@ -104,7 +104,7 @@ class ExampleClassB { container.register!ExampleClassA; auto exampleInstance = new ExampleClassB(); -container.autowire!ExampleClassB(exampleInstance); +container.autowire(exampleInstance); assert(exampleInstance.dependency !is null); ``` At the moment, it is only possible to autowire public members or properties. @@ -133,7 +133,7 @@ class ComponentF { public ComponentA componentA; public this() { - globalAutowire!(typeof(this))(this); + globalAutowire(this); } // or use: diff --git a/source/poodinis/autowire.d b/source/poodinis/autowire.d index 3e6fbc1..c6c7efd 100644 --- a/source/poodinis/autowire.d +++ b/source/poodinis/autowire.d @@ -42,10 +42,10 @@ public void autowire(Type)(Container container, Type instance) { mixin template AutowireConstructor() { public this() { - globalAutowire!(typeof(this))(this); + globalAutowire(this); } } public void globalAutowire(Type)(Type instance) { - Container.getInstance().autowire!(typeof(instance))(instance); + Container.getInstance().autowire(instance); } \ No newline at end of file