From bb4eaf8676da8366769b2954d731b16d0fab8184 Mon Sep 17 00:00:00 2001 From: Mike Bierlee Date: Thu, 29 Apr 2021 00:07:37 +0300 Subject: [PATCH] Clean-up initializer --- source/poodinis/container.d | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/poodinis/container.d b/source/poodinis/container.d index e41e674..2df6775 100644 --- a/source/poodinis/container.d +++ b/source/poodinis/container.d @@ -149,9 +149,9 @@ synchronized class DependencyContainer { return register!(ConcreteType, ConcreteType)(options); } - Registration register(ConcreteType)(InjectionInitializer!ConcreteType creator, + Registration register(ConcreteType)(InjectionInitializer!ConcreteType initializer, RegistrationOption options = RegistrationOption.none) { - return register!(ConcreteType, ConcreteType)(creator, options); + return register!(ConcreteType, ConcreteType)(initializer, options); } /** @@ -204,7 +204,7 @@ synchronized class DependencyContainer { /** * */ - Registration register(SuperType, ConcreteType : SuperType)(InjectionInitializer!SuperType creator, + Registration register(SuperType, ConcreteType : SuperType)(InjectionInitializer!SuperType initializer, RegistrationOption options = RegistrationOption.none) if (is(ConcreteType == class)) { @@ -222,7 +222,7 @@ synchronized class DependencyContainer { InstanceFactory instanceFactory = new class InstanceFactory { protected override Object createInstance() { - return cast(Object)creator(); + return cast(Object)initializer(); } };