ServiceDescriptor.DescribeKeyed Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
DescribeKeyed(Type, Object, Func<IServiceProvider,Object,Object>, ServiceLifetime) |
Creates an instance of ServiceDescriptor with the specified
|
DescribeKeyed(Type, Object, Type, ServiceLifetime) |
Creates an instance of ServiceDescriptor with the specified
|
- Source:
- ServiceDescriptor.cs
- Source:
- ServiceDescriptor.cs
- Source:
- ServiceDescriptor.cs
Creates an instance of ServiceDescriptor with the specified
serviceType
, implementationFactory
,
and lifetime
.
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
Parameters
- serviceType
- Type
The type of the service.
- serviceKey
- Object
The ServiceKey of the service.
- implementationFactory
- Func<IServiceProvider,Object,Object>
A factory to create new instances of the service implementation.
- lifetime
- ServiceLifetime
The lifetime of the service.
Returns
A new instance of ServiceDescriptor.
Applies to
.NET 9 (package-provided) e altre versioni
Prodotto | Versioni |
---|---|
.NET | 8 (package-provided), 9 (package-provided) |
.NET Framework | 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided) |
.NET Standard | 2.0 (package-provided), 2.1 (package-provided) |
- Source:
- ServiceDescriptor.cs
- Source:
- ServiceDescriptor.cs
- Source:
- ServiceDescriptor.cs
Creates an instance of ServiceDescriptor with the specified
serviceType
, implementationType
,
and lifetime
.
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
Parameters
- serviceType
- Type
The type of the service.
- serviceKey
- Object
The ServiceKey of the service.
- implementationType
- Type
The type of the implementation.
- lifetime
- ServiceLifetime
The lifetime of the service.
Returns
A new instance of ServiceDescriptor.
Applies to
.NET 9 (package-provided) e altre versioni
Prodotto | Versioni |
---|---|
.NET | 8 (package-provided), 9 (package-provided) |
.NET Framework | 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided) |
.NET Standard | 2.0 (package-provided), 2.1 (package-provided) |
Feedback su .NET
.NET è un progetto di open source. Selezionare un collegamento per fornire feedback: