Edit

Share via


KeyedServiceExtensions.GetServiceByName<TService> Method

Definition

Acquire a service by 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

Type Parameters

TService

Parameters

services
IServiceProvider
name
String

Returns

TService

Applies to