ServiceDescriptor.KeyedSingleton メソッド

定義

オーバーロード

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

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

KeyedSingleton(Type, Object, Object)

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

KeyedSingleton(Type, Object, Type)

service および implementationTypeSingleton の有効期間を指定して 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);
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

service および implementationTypeSingleton の有効期間を指定して 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;
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;
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 の新しいインスタンス。

適用対象