Compartir a través de


KeyedServiceExtensions.GetServiceByKey<TKey,TService> Método

Definición

Adquirir un servicio por clave.

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

Parámetros de tipo

TKey
TService

Parámetros

services
IServiceProvider
key
TKey

Devoluciones

TService

Se aplica a