Note that members of protected visibility can also be autowired

This commit is contained in:
Mike Bierlee 2016-02-15 20:42:45 +01:00
parent a99256e03c
commit 899e76b3c9

View file

@ -83,7 +83,7 @@ auto exampleInstance = new ExampleClassB();
dependencies.autowire(exampleInstance); dependencies.autowire(exampleInstance);
assert(exampleInstance.dependency !is null); assert(exampleInstance.dependency !is null);
``` ```
It is possible to autowire public and private members. It is possible to autowire public as well as protected and private members.
Dependencies are automatically autowired when a class is resolved. So when you register ExampleClassB, its member, *dependency*, is automatically autowired: Dependencies are automatically autowired when a class is resolved. So when you register ExampleClassB, its member, *dependency*, is automatically autowired:
```d ```d