Condividi tramite


KeyedServiceExtensions.GetServiceByKey<TKey,TService> Metodo

Definizione

Acquisire un servizio in base alla chiave.

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

Parametri di tipo

TKey
TService

Parametri

services
IServiceProvider
key
TKey

Restituisce

TService

Si applica a