共用方式為


ServiceDescriptor.Describe 方法

定義

多載

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

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

Describe(Type, Type, ServiceLifetime)

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

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

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

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

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

參數

serviceType
Type

服務的類型。

implementationFactory
Func<IServiceProvider,Object>

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

lifetime
ServiceLifetime

服務的存留期。

傳回

ServiceDescriptor 的新執行個體。

適用於

Describe(Type, Type, ServiceLifetime)

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

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

public:
 static Microsoft::Extensions::DependencyInjection::ServiceDescriptor ^ Describe(Type ^ serviceType, Type ^ implementationType, Microsoft::Extensions::DependencyInjection::ServiceLifetime lifetime);
public static Microsoft.Extensions.DependencyInjection.ServiceDescriptor Describe (Type serviceType, Type implementationType, Microsoft.Extensions.DependencyInjection.ServiceLifetime lifetime);
static member Describe : Type * Type * Microsoft.Extensions.DependencyInjection.ServiceLifetime -> Microsoft.Extensions.DependencyInjection.ServiceDescriptor
Public Shared Function Describe (serviceType As Type, implementationType As Type, lifetime As ServiceLifetime) As ServiceDescriptor

參數

serviceType
Type

服務的類型。

implementationType
Type

實作的類型。

lifetime
ServiceLifetime

服務的存留期。

傳回

ServiceDescriptor 的新執行個體。

適用於