Language

ServiceProviderKeyedServiceExtensions.GetRequiredKeyedService メソッド

定義

オーバーロード

名前 説明
GetRequiredKeyedService(IServiceProvider, Type, Object)

serviceTypeからIServiceProvider型のサービスを取得します。

GetRequiredKeyedService<T>(IServiceProvider, Object)

TからIServiceProvider型のサービスを取得します。

GetRequiredKeyedService(IServiceProvider, Type, Object)

ソース:
ServiceProviderKeyedServiceExtensions.cs
ソース:
ServiceProviderKeyedServiceExtensions.cs
ソース:
ServiceProviderKeyedServiceExtensions.cs
ソース:
ServiceProviderKeyedServiceExtensions.cs
ソース:
ServiceProviderKeyedServiceExtensions.cs

serviceTypeからIServiceProvider型のサービスを取得します。

public:
[System::Runtime::CompilerServices::Extension]
 static System::Object ^ GetRequiredKeyedService(IServiceProvider ^ provider, Type ^ serviceType, System::Object ^ serviceKey);
public static object GetRequiredKeyedService(this IServiceProvider provider, Type serviceType, object? serviceKey);
static member GetRequiredKeyedService : IServiceProvider * Type * obj -> obj
<Extension()>
Public Function GetRequiredKeyedService (provider As IServiceProvider, serviceType As Type, serviceKey As Object) As Object

パラメーター

provider
IServiceProvider

サービス オブジェクトを取得する IServiceProvider 。

serviceType
Type

取得するサービス オブジェクトの種類を指定するオブジェクト。

serviceKey
Object

取得するサービス オブジェクトのキーを指定するオブジェクト。

返品

serviceType型のサービス オブジェクト。

例外

serviceType型のサービスはありません。

適用対象

GetRequiredKeyedService<T>(IServiceProvider, Object)

ソース:
ServiceProviderKeyedServiceExtensions.cs
ソース:
ServiceProviderKeyedServiceExtensions.cs
ソース:
ServiceProviderKeyedServiceExtensions.cs
ソース:
ServiceProviderKeyedServiceExtensions.cs
ソース:
ServiceProviderKeyedServiceExtensions.cs

TからIServiceProvider型のサービスを取得します。

public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static T GetRequiredKeyedService(IServiceProvider ^ provider, System::Object ^ serviceKey);
public static T GetRequiredKeyedService<T>(this IServiceProvider provider, object? serviceKey);
static member GetRequiredKeyedService : IServiceProvider * obj -> 'T
<Extension()>
Public Function GetRequiredKeyedService(Of T) (provider As IServiceProvider, serviceKey As Object) As T

型パラメーター

T

取得するサービス オブジェクトの型。

パラメーター

provider
IServiceProvider

サービス オブジェクトを取得する IServiceProvider 。

serviceKey
Object

取得するサービス オブジェクトのキーを指定するオブジェクト。

返品

T

T型のサービス オブジェクト。

例外

T型のサービスはありません。

適用対象