ContainerGetAllInstancesTService Method

Simple Injector
Gets all instances of the given TService currently registered in the container.

Namespace:  SimpleInjector
Assembly:  SimpleInjector (in SimpleInjector.dll) Version: 4.0.0
Syntax

public IEnumerable<TService> GetAllInstances<TService>()
where TService : class

Type Parameters

TService
Type of object requested.

Return Value

Type: IEnumerableTService
A sequence of instances of the requested TService.
Exceptions

ExceptionCondition
ActivationExceptionThrown when there are errors resolving the service instance.
See Also

Reference