mirror of
https://github.com/mbierlee/poodinis.git
synced 2024-11-15 04:04:01 +01:00
Clean-up initializer
This commit is contained in:
parent
1ae7f5789c
commit
bb4eaf8676
|
@ -149,9 +149,9 @@ synchronized class DependencyContainer {
|
||||||
return register!(ConcreteType, ConcreteType)(options);
|
return register!(ConcreteType, ConcreteType)(options);
|
||||||
}
|
}
|
||||||
|
|
||||||
Registration register(ConcreteType)(InjectionInitializer!ConcreteType creator,
|
Registration register(ConcreteType)(InjectionInitializer!ConcreteType initializer,
|
||||||
RegistrationOption options = RegistrationOption.none) {
|
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)
|
RegistrationOption options = RegistrationOption.none)
|
||||||
if (is(ConcreteType == class)) {
|
if (is(ConcreteType == class)) {
|
||||||
|
|
||||||
|
@ -222,7 +222,7 @@ synchronized class DependencyContainer {
|
||||||
|
|
||||||
InstanceFactory instanceFactory = new class InstanceFactory {
|
InstanceFactory instanceFactory = new class InstanceFactory {
|
||||||
protected override Object createInstance() {
|
protected override Object createInstance() {
|
||||||
return cast(Object)creator();
|
return cast(Object)initializer();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue