次の方法で共有


KeyedServiceExtensions.GetServiceByName<TService> メソッド

定義

名前でサービスを取得します。

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

型パラメーター

TService

パラメーター

services
IServiceProvider
name
String

戻り値

TService

適用対象