poodinis.registration

This module contains objects for defining and scoping dependency registrations.

Part of the Poodinis Dependency Injection framework.

Members

Classes

InstantiationContext
class InstantiationContext
Undocumented in source.
Registration
class Registration
Undocumented in source.

Functions

existingInstance
Registration existingInstance(Registration registration, Object instance)

Scopes registrations to return the given instance every time the given registration is resolved.

initializeFactoryType
Registration initializeFactoryType(Registration registration)

Sets the registration's instance factory type the same as the registration's.

initializedBy
Registration initializedBy(Registration registration, T delegate() initializer)

Scopes registrations to create new instances using the given initializer delegate.

initializedOnceBy
Registration initializedOnceBy(Registration registration, T delegate() initializer)

Scopes registrations to create a new instance using the given initializer delegate. On subsequent resolves the same instance is returned.

newInstance
Registration newInstance(Registration registration)

Scopes registrations to return a new instance every time the given registration is resolved.

singleInstance
Registration singleInstance(Registration registration)

Scopes registrations to return the same instance every time a given registration is resolved.

toConcreteTypeListString
string toConcreteTypeListString(Registration[] registrations)
Undocumented in source. Be warned that the author may not have intended to support it.

Meta

Authors

Mike Bierlee, m.bierlee@lostmoment.com

License

This software is licensed under the terms of the MIT license. The full terms of the license can be found in the LICENSE file.