Parameters
- serviceProvider
- The service provider.
Type Parameters
- TService
- The type of service object to get.
Return Value
A service object of type TService.
This is functionally based on the GetRequiredService0(IServiceProvider,Type), but provides a strongly typed result, while removing the need to specify the type using the typeof
keyword at the same time.
Target Platforms: .NET Framework: Windows 7 with SP1, Windows Server 2012; .NET Core: Linux, Microsoft Windows