Freigeben über


KeyedServiceExtensions.GetServiceByName<TService> Methode

Definition

Erwerben Sie einen Dienst nach Name.

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

Typparameter

TService

Parameter

services
IServiceProvider
name
String

Gibt zurück

TService

Gilt für: