Compartilhar via


KeyedServiceExtensions.GetServiceByName<TService> Método

Definição

Adquira um serviço por nome.

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

Parâmetros de tipo

TService

Parâmetros

services
IServiceProvider
name
String

Retornos

TService

Aplica-se a