ScopeGetInstanceTService Method

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

Namespace:  SimpleInjector
Assembly:  SimpleInjector (in SimpleInjector.dll) Version: 4.4.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.
See Also

Reference