ServiceDescriptor.KeyedSingleton メソッド

定義

オーバーロード

名前 説明
KeyedSingleton(Type, Object, Func<IServiceProvider,Object,Object>)

指定したserviceTypeimplementationFactory、およびSingletonの有効期間を使用して、ServiceDescriptorのインスタンスを作成します。

KeyedSingleton(Type, Object, Object)

指定したserviceTypeimplementationInstance、およびSingletonの有効期間を使用して、ServiceDescriptorのインスタンスを作成します。

KeyedSingleton(Type, Object, Type)

指定したserviceimplementationTypeSingletonの有効期間を使用して、ServiceDescriptorのインスタンスを作成します。

KeyedSingleton<TService,TImplementation>(Object, Func<IServiceProvider,Object,TImplementation>)

指定したTServiceTImplementationimplementationFactory、およびSingleton有効期間を使用して、ServiceDescriptorのインスタンスを作成します。

KeyedSingleton<TService,TImplementation>(Object)

指定したTServiceTImplementation、およびSingletonの有効期間を使用して、ServiceDescriptorのインスタンスを作成します。

KeyedSingleton<TService>(Object, Func<IServiceProvider,Object,TService>)

指定したTServiceimplementationFactory、およびSingletonの有効期間を使用して、ServiceDescriptorのインスタンスを作成します。

KeyedSingleton<TService>(Object, TService)

指定したTServiceimplementationInstance、およびSingletonの有効期間を使用して、ServiceDescriptorのインスタンスを作成します。

KeyedSingleton(Type, Object, Func<IServiceProvider,Object,Object>)

ソース:
ServiceDescriptor.cs
ソース:
ServiceDescriptor.cs
ソース:
ServiceDescriptor.cs
ソース:
ServiceDescriptor.cs

指定したserviceTypeimplementationFactory、およびSingletonの有効期間を使用して、ServiceDescriptorのインスタンスを作成します。

public:
 static Microsoft::Extensions::DependencyInjection::ServiceDescriptor ^ KeyedSingleton(Type ^ serviceType, System::Object ^ serviceKey, Func<IServiceProvider ^, System::Object ^, System::Object ^> ^ implementationFactory);
public static Microsoft.Extensions.DependencyInjection.ServiceDescriptor KeyedSingleton(Type serviceType, object? serviceKey, Func<IServiceProvider,object?,object> implementationFactory);
public static Microsoft.Extensions.DependencyInjection.ServiceDescriptor KeyedSingleton(Type serviceType, object? serviceKey, Func<IServiceProvider,object,object> implementationFactory);
static member KeyedSingleton : Type * obj * Func<IServiceProvider, obj, obj> -> Microsoft.Extensions.DependencyInjection.ServiceDescriptor
Public Shared Function KeyedSingleton (serviceType As Type, serviceKey As Object, implementationFactory As Func(Of IServiceProvider, Object, Object)) As ServiceDescriptor

パラメーター

serviceType
Type

サービスの種類。

serviceKey
Object

サービスの ServiceKey

implementationFactory
Func<IServiceProvider,Object,Object>

サービス実装の新しいインスタンスを作成するファクトリ。

返品

ServiceDescriptorの新しいインスタンス。

適用対象

KeyedSingleton(Type, Object, Object)

ソース:
ServiceDescriptor.cs
ソース:
ServiceDescriptor.cs
ソース:
ServiceDescriptor.cs
ソース:
ServiceDescriptor.cs

指定したserviceTypeimplementationInstance、およびSingletonの有効期間を使用して、ServiceDescriptorのインスタンスを作成します。

public:
 static Microsoft::Extensions::DependencyInjection::ServiceDescriptor ^ KeyedSingleton(Type ^ serviceType, System::Object ^ serviceKey, System::Object ^ implementationInstance);
public static Microsoft.Extensions.DependencyInjection.ServiceDescriptor KeyedSingleton(Type serviceType, object? serviceKey, object implementationInstance);
static member KeyedSingleton : Type * obj * obj -> Microsoft.Extensions.DependencyInjection.ServiceDescriptor
Public Shared Function KeyedSingleton (serviceType As Type, serviceKey As Object, implementationInstance As Object) As ServiceDescriptor

パラメーター

serviceType
Type

サービスの種類。

serviceKey
Object

サービスの ServiceKey

implementationInstance
Object

実装のインスタンス。

返品

ServiceDescriptorの新しいインスタンス。

適用対象

KeyedSingleton(Type, Object, Type)

ソース:
ServiceDescriptor.cs
ソース:
ServiceDescriptor.cs
ソース:
ServiceDescriptor.cs
ソース:
ServiceDescriptor.cs

指定したserviceimplementationTypeSingletonの有効期間を使用して、ServiceDescriptorのインスタンスを作成します。

public:
 static Microsoft::Extensions::DependencyInjection::ServiceDescriptor ^ KeyedSingleton(Type ^ service, System::Object ^ serviceKey, Type ^ implementationType);
public static Microsoft.Extensions.DependencyInjection.ServiceDescriptor KeyedSingleton(Type service, object? serviceKey, Type implementationType);
static member KeyedSingleton : Type * obj * Type -> Microsoft.Extensions.DependencyInjection.ServiceDescriptor
Public Shared Function KeyedSingleton (service As Type, serviceKey As Object, implementationType As Type) As ServiceDescriptor

パラメーター

service
Type

サービスの種類。

serviceKey
Object

サービスの ServiceKey

implementationType
Type

実装の型。

返品

ServiceDescriptorの新しいインスタンス。

適用対象

KeyedSingleton<TService,TImplementation>(Object, Func<IServiceProvider,Object,TImplementation>)

ソース:
ServiceDescriptor.cs
ソース:
ServiceDescriptor.cs
ソース:
ServiceDescriptor.cs
ソース:
ServiceDescriptor.cs

指定したTServiceTImplementationimplementationFactory、およびSingleton有効期間を使用して、ServiceDescriptorのインスタンスを作成します。

public:
generic <typename TService, typename TImplementation>
 where TService : class where TImplementation : class, TService static Microsoft::Extensions::DependencyInjection::ServiceDescriptor ^ KeyedSingleton(System::Object ^ serviceKey, Func<IServiceProvider ^, System::Object ^, TImplementation> ^ implementationFactory);
public static Microsoft.Extensions.DependencyInjection.ServiceDescriptor KeyedSingleton<TService,TImplementation>(object? serviceKey, Func<IServiceProvider,object?,TImplementation> implementationFactory) where TService : class where TImplementation : class, TService;
public static Microsoft.Extensions.DependencyInjection.ServiceDescriptor KeyedSingleton<TService,TImplementation>(object? serviceKey, Func<IServiceProvider,object,TImplementation> implementationFactory) where TService : class where TImplementation : class, TService;
static member KeyedSingleton : obj * Func<IServiceProvider, obj, #'Service> -> Microsoft.Extensions.DependencyInjection.ServiceDescriptor (requires 'Service : null)
Public Shared Function KeyedSingleton(Of TService As Class, TImplementation As Class) (serviceKey As Object, implementationFactory As Func(Of IServiceProvider, Object, TImplementation)) As ServiceDescriptor

型パラメーター

TService

サービスの種類。

TImplementation

実装の型。

パラメーター

serviceKey
Object

サービスの ServiceKey

implementationFactory
Func<IServiceProvider,Object,TImplementation>

サービス実装の新しいインスタンスを作成するファクトリ。

返品

ServiceDescriptorの新しいインスタンス。

適用対象

KeyedSingleton<TService,TImplementation>(Object)

ソース:
ServiceDescriptor.cs
ソース:
ServiceDescriptor.cs
ソース:
ServiceDescriptor.cs
ソース:
ServiceDescriptor.cs

指定したTServiceTImplementation、およびSingletonの有効期間を使用して、ServiceDescriptorのインスタンスを作成します。

public:
generic <typename TService, typename TImplementation>
 where TService : class where TImplementation : class, TService static Microsoft::Extensions::DependencyInjection::ServiceDescriptor ^ KeyedSingleton(System::Object ^ serviceKey);
public static Microsoft.Extensions.DependencyInjection.ServiceDescriptor KeyedSingleton<TService,TImplementation>(object? serviceKey) where TService : class where TImplementation : class, TService;
static member KeyedSingleton : obj -> Microsoft.Extensions.DependencyInjection.ServiceDescriptor (requires 'Service : null)
Public Shared Function KeyedSingleton(Of TService As Class, TImplementation As Class) (serviceKey As Object) As ServiceDescriptor

型パラメーター

TService

サービスの種類。

TImplementation

実装の型。

パラメーター

serviceKey
Object

サービスの ServiceKey

返品

ServiceDescriptorの新しいインスタンス。

適用対象

KeyedSingleton<TService>(Object, Func<IServiceProvider,Object,TService>)

ソース:
ServiceDescriptor.cs
ソース:
ServiceDescriptor.cs
ソース:
ServiceDescriptor.cs
ソース:
ServiceDescriptor.cs

指定したTServiceimplementationFactory、およびSingletonの有効期間を使用して、ServiceDescriptorのインスタンスを作成します。

public:
generic <typename TService>
 where TService : class static Microsoft::Extensions::DependencyInjection::ServiceDescriptor ^ KeyedSingleton(System::Object ^ serviceKey, Func<IServiceProvider ^, System::Object ^, TService> ^ implementationFactory);
public static Microsoft.Extensions.DependencyInjection.ServiceDescriptor KeyedSingleton<TService>(object? serviceKey, Func<IServiceProvider,object?,TService> implementationFactory) where TService : class;
public static Microsoft.Extensions.DependencyInjection.ServiceDescriptor KeyedSingleton<TService>(object? serviceKey, Func<IServiceProvider,object,TService> implementationFactory) where TService : class;
static member KeyedSingleton : obj * Func<IServiceProvider, obj, 'Service (requires 'Service : null)> -> Microsoft.Extensions.DependencyInjection.ServiceDescriptor (requires 'Service : null)
Public Shared Function KeyedSingleton(Of TService As Class) (serviceKey As Object, implementationFactory As Func(Of IServiceProvider, Object, TService)) As ServiceDescriptor

型パラメーター

TService

サービスの種類。

パラメーター

serviceKey
Object

サービスの ServiceKey

implementationFactory
Func<IServiceProvider,Object,TService>

サービス実装の新しいインスタンスを作成するファクトリ。

返品

ServiceDescriptorの新しいインスタンス。

適用対象

KeyedSingleton<TService>(Object, TService)

ソース:
ServiceDescriptor.cs
ソース:
ServiceDescriptor.cs
ソース:
ServiceDescriptor.cs
ソース:
ServiceDescriptor.cs

指定したTServiceimplementationInstance、およびSingletonの有効期間を使用して、ServiceDescriptorのインスタンスを作成します。

public:
generic <typename TService>
 where TService : class static Microsoft::Extensions::DependencyInjection::ServiceDescriptor ^ KeyedSingleton(System::Object ^ serviceKey, TService implementationInstance);
public static Microsoft.Extensions.DependencyInjection.ServiceDescriptor KeyedSingleton<TService>(object? serviceKey, TService implementationInstance) where TService : class;
static member KeyedSingleton : obj * 'Service -> Microsoft.Extensions.DependencyInjection.ServiceDescriptor (requires 'Service : null)
Public Shared Function KeyedSingleton(Of TService As Class) (serviceKey As Object, implementationInstance As TService) As ServiceDescriptor

型パラメーター

TService

サービスの種類。

パラメーター

serviceKey
Object

サービスの ServiceKey

implementationInstance
TService

実装のインスタンス。

返品

ServiceDescriptorの新しいインスタンス。

適用対象