mirror of
https://github.com/mbierlee/poodinis.git
synced 2024-11-15 04:04:01 +01:00
Move registration to own module
This commit is contained in:
parent
990c9f017b
commit
ac077c24d7
|
@ -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) {
|
||||
|
|
10
source/poodinis/registration.d
Normal file
10
source/poodinis/registration.d
Normal file
|
@ -0,0 +1,10 @@
|
|||
module poodinis.registration;
|
||||
|
||||
struct Registration {
|
||||
TypeInfo registeredType = null;
|
||||
TypeInfo_Class instantiatableType = null;
|
||||
|
||||
public Object getInstance() {
|
||||
return instantiatableType.create();
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue