From ac077c24d788f035387ca4e8185883878fe29ac9 Mon Sep 17 00:00:00 2001 From: Mike Bierlee Date: Tue, 20 May 2014 21:38:14 +0200 Subject: [PATCH] Move registration to own module --- source/poodinis/container.d | 9 +-------- source/poodinis/registration.d | 10 ++++++++++ 2 files changed, 11 insertions(+), 8 deletions(-) create mode 100644 source/poodinis/registration.d diff --git a/source/poodinis/container.d b/source/poodinis/container.d index 09638a2..3e343d9 100644 --- a/source/poodinis/container.d +++ b/source/poodinis/container.d @@ -3,14 +3,7 @@ module poodinis.container; import std.string; import std.array; -struct Registration { - TypeInfo registeredType = null; - TypeInfo_Class instantiatableType = null; - - public Object getInstance() { - return instantiatableType.create(); - } -} +public import poodinis.registration; class RegistrationException : Exception { this(string message, TypeInfo registeredType, TypeInfo_Class instantiatableType) { diff --git a/source/poodinis/registration.d b/source/poodinis/registration.d new file mode 100644 index 0000000..dc90077 --- /dev/null +++ b/source/poodinis/registration.d @@ -0,0 +1,10 @@ +module poodinis.registration; + +struct Registration { + TypeInfo registeredType = null; + TypeInfo_Class instantiatableType = null; + + public Object getInstance() { + return instantiatableType.create(); + } +}