ServiceDescriptor Constructors
Definition
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.
Overloads
ServiceDescriptor(Type, Object) |
Initializes a new instance of ServiceDescriptor with the specified |
ServiceDescriptor(Type, Func<IServiceProvider,Object>, ServiceLifetime) |
Initializes a new instance of ServiceDescriptor with the specified |
ServiceDescriptor(Type, Object, Object) |
Initializes a new instance of ServiceDescriptor with the specified |
ServiceDescriptor(Type, Type, ServiceLifetime) |
Initializes a new instance of ServiceDescriptor with the specified |
ServiceDescriptor(Type, Object, Func<IServiceProvider,Object,Object>, ServiceLifetime) |
Initializes a new instance of ServiceDescriptor with the specified |
ServiceDescriptor(Type, Object, Type, ServiceLifetime) |
Initializes a new instance of ServiceDescriptor with the specified |
ServiceDescriptor(Type, Object)
- Source:
- ServiceDescriptor.cs
- Source:
- ServiceDescriptor.cs
- Source:
- ServiceDescriptor.cs
- Source:
- ServiceDescriptor.cs
- Source:
- ServiceDescriptor.cs
Initializes a new instance of ServiceDescriptor with the specified instance
as a Singleton.
public:
ServiceDescriptor(Type ^ serviceType, System::Object ^ instance);
public ServiceDescriptor (Type serviceType, object instance);
new Microsoft.Extensions.DependencyInjection.ServiceDescriptor : Type * obj -> Microsoft.Extensions.DependencyInjection.ServiceDescriptor
Public Sub New (serviceType As Type, instance As Object)
Parameters
- instance
- Object
The instance implementing the service.
Applies to
ServiceDescriptor(Type, Func<IServiceProvider,Object>, ServiceLifetime)
- Source:
- ServiceDescriptor.cs
- Source:
- ServiceDescriptor.cs
- Source:
- ServiceDescriptor.cs
- Source:
- ServiceDescriptor.cs
- Source:
- ServiceDescriptor.cs
Initializes a new instance of ServiceDescriptor with the specified factory
.
public:
ServiceDescriptor(Type ^ serviceType, Func<IServiceProvider ^, System::Object ^> ^ factory, Microsoft::Extensions::DependencyInjection::ServiceLifetime lifetime);
public ServiceDescriptor (Type serviceType, Func<IServiceProvider,object> factory, Microsoft.Extensions.DependencyInjection.ServiceLifetime lifetime);
new Microsoft.Extensions.DependencyInjection.ServiceDescriptor : Type * Func<IServiceProvider, obj> * Microsoft.Extensions.DependencyInjection.ServiceLifetime -> Microsoft.Extensions.DependencyInjection.ServiceDescriptor
Public Sub New (serviceType As Type, factory As Func(Of IServiceProvider, Object), lifetime As ServiceLifetime)
Parameters
- factory
- Func<IServiceProvider,Object>
A factory used for creating service instances.
- lifetime
- ServiceLifetime
The ServiceLifetime of the service.
Applies to
ServiceDescriptor(Type, Object, Object)
- Source:
- ServiceDescriptor.cs
- Source:
- ServiceDescriptor.cs
- Source:
- ServiceDescriptor.cs
- Source:
- ServiceDescriptor.cs
Initializes a new instance of ServiceDescriptor with the specified instance
as a Singleton.
public:
ServiceDescriptor(Type ^ serviceType, System::Object ^ serviceKey, System::Object ^ instance);
public ServiceDescriptor (Type serviceType, object? serviceKey, object instance);
new Microsoft.Extensions.DependencyInjection.ServiceDescriptor : Type * obj * obj -> Microsoft.Extensions.DependencyInjection.ServiceDescriptor
Public Sub New (serviceType As Type, serviceKey As Object, instance As Object)
Parameters
- serviceKey
- Object
The ServiceKey of the service.
- instance
- Object
The instance implementing the service.
Applies to
ServiceDescriptor(Type, Type, ServiceLifetime)
- Source:
- ServiceDescriptor.cs
- Source:
- ServiceDescriptor.cs
- Source:
- ServiceDescriptor.cs
- Source:
- ServiceDescriptor.cs
- Source:
- ServiceDescriptor.cs
Initializes a new instance of ServiceDescriptor with the specified implementationType
.
public:
ServiceDescriptor(Type ^ serviceType, Type ^ implementationType, Microsoft::Extensions::DependencyInjection::ServiceLifetime lifetime);
public ServiceDescriptor (Type serviceType, Type implementationType, Microsoft.Extensions.DependencyInjection.ServiceLifetime lifetime);
new Microsoft.Extensions.DependencyInjection.ServiceDescriptor : Type * Type * Microsoft.Extensions.DependencyInjection.ServiceLifetime -> Microsoft.Extensions.DependencyInjection.ServiceDescriptor
Public Sub New (serviceType As Type, implementationType As Type, lifetime As ServiceLifetime)
Parameters
- lifetime
- ServiceLifetime
The ServiceLifetime of the service.
Applies to
ServiceDescriptor(Type, Object, Func<IServiceProvider,Object,Object>, ServiceLifetime)
- Source:
- ServiceDescriptor.cs
- Source:
- ServiceDescriptor.cs
- Source:
- ServiceDescriptor.cs
- Source:
- ServiceDescriptor.cs
Initializes a new instance of ServiceDescriptor with the specified factory
.
public:
ServiceDescriptor(Type ^ serviceType, System::Object ^ serviceKey, Func<IServiceProvider ^, System::Object ^, System::Object ^> ^ factory, Microsoft::Extensions::DependencyInjection::ServiceLifetime lifetime);
public ServiceDescriptor (Type serviceType, object? serviceKey, Func<IServiceProvider,object?,object> factory, Microsoft.Extensions.DependencyInjection.ServiceLifetime lifetime);
new Microsoft.Extensions.DependencyInjection.ServiceDescriptor : Type * obj * Func<IServiceProvider, obj, obj> * Microsoft.Extensions.DependencyInjection.ServiceLifetime -> Microsoft.Extensions.DependencyInjection.ServiceDescriptor
Public Sub New (serviceType As Type, serviceKey As Object, factory As Func(Of IServiceProvider, Object, Object), lifetime As ServiceLifetime)
Parameters
- serviceKey
- Object
The ServiceKey of the service.
- factory
- Func<IServiceProvider,Object,Object>
A factory used for creating service instances.
- lifetime
- ServiceLifetime
The ServiceLifetime of the service.
Applies to
ServiceDescriptor(Type, Object, Type, ServiceLifetime)
- Source:
- ServiceDescriptor.cs
- Source:
- ServiceDescriptor.cs
- Source:
- ServiceDescriptor.cs
- Source:
- ServiceDescriptor.cs
Initializes a new instance of ServiceDescriptor with the specified implementationType
.
public:
ServiceDescriptor(Type ^ serviceType, System::Object ^ serviceKey, Type ^ implementationType, Microsoft::Extensions::DependencyInjection::ServiceLifetime lifetime);
public ServiceDescriptor (Type serviceType, object? serviceKey, Type implementationType, Microsoft.Extensions.DependencyInjection.ServiceLifetime lifetime);
new Microsoft.Extensions.DependencyInjection.ServiceDescriptor : Type * obj * Type * Microsoft.Extensions.DependencyInjection.ServiceLifetime -> Microsoft.Extensions.DependencyInjection.ServiceDescriptor
Public Sub New (serviceType As Type, serviceKey As Object, implementationType As Type, lifetime As ServiceLifetime)
Parameters
- serviceKey
- Object
The ServiceKey of the service.
- lifetime
- ServiceLifetime
The ServiceLifetime of the service.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Binnenkort: Gedurende 2024 worden GitHub Issues uitgefaseerd als het feedbackmechanisme voor inhoud. Dit wordt vervangen door een nieuw feedbacksysteem. Ga voor meer informatie naar:Feedback verzenden en bekijken voor