From 1a51e2081eecc19735ce96257bd0710b8b72cecd Mon Sep 17 00:00:00 2001 From: Mike Bierlee Date: Tue, 23 Aug 2016 21:28:54 +0200 Subject: [PATCH] Remove redundant addition --- TUTORIAL.md | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/TUTORIAL.md b/TUTORIAL.md index 5e493c3..05b17c4 100644 --- a/TUTORIAL.md +++ b/TUTORIAL.md @@ -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.