Remove redundant addition

This commit is contained in:
Mike Bierlee 2016-08-23 21:28:54 +02:00
parent de26a49b8d
commit 1a51e2081e

View file

@ -81,13 +81,8 @@ class ExampleClassB {
dependencies.register!ExampleClassA; dependencies.register!ExampleClassA;
auto exampleInstance = new ExampleClassB(); auto exampleInstance = new ExampleClassB();
// Manual autowiring
dependencies.autowire(exampleInstance); dependencies.autowire(exampleInstance);
assert(exampleInstance.dependency !is null);
// Let the container autowire on resolve
dependencies.register!ExampleClassB;
auto exampleInstance2 = dependencies.resolve!ExampleClassB;
``` ```
It is possible to autowire public as well as protected and private members. It is possible to autowire public as well as protected and private members.