共用方式為


ServiceDescriptor.DescribeKeyed 方法

定義

多載

DescribeKeyed(Type, Object, Func<IServiceProvider,Object,Object>, ServiceLifetime)

使用指定的 serviceTypeimplementationFactorylifetime 來建立 ServiceDescriptor 的執行個體。

DescribeKeyed(Type, Object, Type, ServiceLifetime)

使用指定的 serviceTypeimplementationTypelifetime 來建立 ServiceDescriptor 的執行個體。

DescribeKeyed(Type, Object, Func<IServiceProvider,Object,Object>, ServiceLifetime)

來源:
ServiceDescriptor.cs
來源:
ServiceDescriptor.cs
來源:
ServiceDescriptor.cs
來源:
ServiceDescriptor.cs

使用指定的 serviceTypeimplementationFactorylifetime 來建立 ServiceDescriptor 的執行個體。

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

參數

serviceType
Type

服務的類型。

serviceKey
Object

服務的 ServiceKey

implementationFactory
Func<IServiceProvider,Object,Object>

建立服務實作之新執行個體的 Factory。

lifetime
ServiceLifetime

服務的存留期。

傳回

ServiceDescriptor 的新執行個體。

適用於

DescribeKeyed(Type, Object, Type, ServiceLifetime)

來源:
ServiceDescriptor.cs
來源:
ServiceDescriptor.cs
來源:
ServiceDescriptor.cs
來源:
ServiceDescriptor.cs

使用指定的 serviceTypeimplementationTypelifetime 來建立 ServiceDescriptor 的執行個體。

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

參數

serviceType
Type

服務的類型。

serviceKey
Object

服務的 ServiceKey

implementationType
Type

實作的類型。

lifetime
ServiceLifetime

服務的存留期。

傳回

ServiceDescriptor 的新執行個體。

適用於