다음을 통해 공유


KeyedServiceExtensions.GetServiceByKey<TKey,TService> 메서드

정의

키로 서비스를 획득합니다.

public static TService GetServiceByKey<TKey,TService> (this IServiceProvider services, TKey key) where TService : class;
static member GetServiceByKey : IServiceProvider * 'Key -> 'Service (requires 'Service : null)
<Extension()>
Public Function GetServiceByKey(Of TKey, TService) (services As IServiceProvider, key As TKey) As TService

형식 매개 변수

TKey
TService

매개 변수

services
IServiceProvider
key
TKey

반환

TService

적용 대상