ServiceCollectionExtensions.

GetServiceForType<TService, TType>(IServiceProvider) Method

Syntax

public static TService GetServiceForType<TService, TType>(this IServiceProvider serviceProvider)

Type Parameters

Name Description
TService
TType

Parameters

Name Type Description
serviceProvider IServiceProvider

Return Value

Type Description
TService
GitHub