DependencyContainer.resolveAll

Resolve all dependencies registered to a super type.

class DependencyContainer
public
RegistrationType[]
resolveAll
(
RegistrationType
)

Return Value

Type: RegistrationType[]

An array of autowired instances is returned. The order is undetermined.

Examples

class Cat : Animal { ... }
class Dog : Animal { ... }

container.register!(Animal, Cat);
container.register!(Animal, Dog);

Animal[] animals = container.resolveAll!Animal;

Meta