IServiceDescriptor Interface
Namespace: Microsoft.Extensions.DependencyInjection
Summary
Describes a service registration in an IServiceCollection.
Remarks
This interface provides a contract for describing how a service should be registered with the dependency injection container. It exposes properties such as the service type, implementation type, and lifetime.
Concrete implementations, like ServiceDescriptor
, are used to create these descriptions.
Properties
Name | Type | Description |
---|---|---|
ImplementationFactory |
Func<IServiceProvider, object> |
A factory function that can be used to create an instance of the service. |
ImplementationInstance |
object |
An instance of the service. |
ImplementationType |
Type |
The |
Lifetime |
ServiceLifetime | The ServiceLifetime of the service. |
ServiceType |
Type |
The |
Methods
Equals(object obj)
Determines whether the specified object is equal to the current object.
GetHashCode()
Serves as the default hash function.
GetType()
Gets the type of the current instance.
ToString()
Returns a string that represents the current object.