ScopeGetInstanceTService Method

Simple Injector
Gets an instance of the given TService for the current scope.

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

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

Type Parameters

TService
The type of the service to resolve.

Return Value

Type: TService
An instance of the given service type.
Remarks

Thread safety: Calls to this method are thread safe.
See Also

Reference