mirror of
https://github.com/mbierlee/poodinis.git
synced 2024-11-15 04:04:01 +01:00
Remove redundant addition
This commit is contained in:
parent
de26a49b8d
commit
1a51e2081e
|
@ -81,13 +81,8 @@ class ExampleClassB {
|
|||
|
||||
dependencies.register!ExampleClassA;
|
||||
auto exampleInstance = new ExampleClassB();
|
||||
|
||||
// Manual autowiring
|
||||
dependencies.autowire(exampleInstance);
|
||||
|
||||
// Let the container autowire on resolve
|
||||
dependencies.register!ExampleClassB;
|
||||
auto exampleInstance2 = dependencies.resolve!ExampleClassB;
|
||||
dependencies.autowire(exampleInstance);
|
||||
assert(exampleInstance.dependency !is null);
|
||||
```
|
||||
It is possible to autowire public as well as protected and private members.
|
||||
|
||||
|
|
Loading…
Reference in a new issue