From 2aef9a17608106909b3fbed1713a26b1923f0a34 Mon Sep 17 00:00:00 2001 From: Mike Bierlee Date: Sun, 14 Dec 2014 19:20:35 +0100 Subject: [PATCH] Autowire using the qualifier type when resolving dependencies This will make sure the members of sub-types are also autowired, when a qualifier is given. --- source/poodinis/dependency.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/poodinis/dependency.d b/source/poodinis/dependency.d index bf59a42..1e91bed 100644 --- a/source/poodinis/dependency.d +++ b/source/poodinis/dependency.d @@ -99,7 +99,7 @@ class DependencyContainer { if (!autowireStack.canFind(registration)) { autowireStack ~= registration; - this.autowire!(RegistrationType)(instance); + this.autowire!(QualifierType)(cast(QualifierType)instance); autowireStack.popBack(); }