ContainerGetInstanceTService Method

Simple Injector
Gets an instance of the given TService.

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

public TService GetInstance<TService>()
where TService : class

Type Parameters

TService
Type of object requested.

Return Value

Type: TService
The requested service instance.
Exceptions

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

Reference