mirror of
https://github.com/mbierlee/poodinis.git
synced 2024-11-15 04:04:01 +01:00
Interface is allowed by initializedBy.
This commit is contained in:
parent
dcaa4d77be
commit
3a5d5bf214
|
@ -130,7 +130,8 @@ public Registration existingInstance(Registration registration, Object instance)
|
||||||
/**
|
/**
|
||||||
* Scopes registrations to create new instances using the given initializer delegate.
|
* Scopes registrations to create new instances using the given initializer delegate.
|
||||||
*/
|
*/
|
||||||
public Registration initializedBy(T : Object)(Registration registration, T delegate() initializer)
|
public Registration initializedBy(T)(Registration registration, T delegate() initializer)
|
||||||
|
if(is(T == class) || is(T == interface))
|
||||||
{
|
{
|
||||||
registration.instanceFactory.factoryParameters = InstanceFactoryParameters(
|
registration.instanceFactory.factoryParameters = InstanceFactoryParameters(
|
||||||
registration.instanceType, CreatesSingleton.no, null, {
|
registration.instanceType, CreatesSingleton.no, null, {
|
||||||
|
|
Loading…
Reference in a new issue