Partager via


KeyedServiceExtensions.GetServiceByName<TService> Méthode

Définition

Acquérir un service par son nom.

public static TService GetServiceByName<TService> (this IServiceProvider services, string name) where TService : class;
static member GetServiceByName : IServiceProvider * string -> 'Service (requires 'Service : null)
<Extension()>
Public Function GetServiceByName(Of TService As Class) (services As IServiceProvider, name As String) As TService

Paramètres de type

TService

Paramètres

services
IServiceProvider
name
String

Retours

TService

S’applique à