Freigeben über


KeyedServiceExtensions.GetServiceByKey<TKey,TService> Methode

Definition

Erwerben Sie einen Dienst nach Schlüssel.

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

Typparameter

TKey
TService

Parameter

services
IServiceProvider
key
TKey

Gibt zurück

TService

Gilt für: