ServiceDescriptor
Describes a service with its service type, implementation, and lifetime.
Initializes a new instance of ServiceDescriptor with the specified implementationType.
public ServiceDescriptor(Type serviceType, Func<IServiceProvider, object> factory, ServiceLifetime lifetime)
Initializes a new instance of ServiceDescriptor with the specified factory.
public static ServiceDescriptor Describe(Type serviceType, Type implementationType, ServiceLifetime lifetime)
Creates an instance of ServiceDescriptor with the specified
serviceType, implementationType,
and lifetime.
public static ServiceDescriptor Describe(Type serviceType, Func<IServiceProvider, object> implementationFactory, ServiceLifetime lifetime)
Creates an instance of ServiceDescriptor with the specified
serviceType, implementationFactory,
and lifetime.
public static ServiceDescriptor Scoped<TService, TImplementation>() where TImplementation : TService
Creates an instance of ServiceDescriptor with the specified
TService, TImplementation,
and the Scoped lifetime.
Creates an instance of ServiceDescriptor with the specified
service and implementationType
and the Scoped lifetime.
public static ServiceDescriptor Scoped<TService, TImplementation>(Func<IServiceProvider, TImplementation> implementationFactory) where TImplementation : TService
Creates an instance of ServiceDescriptor with the specified
TService, TImplementation,
implementationFactory,
and the Scoped lifetime.
public static ServiceDescriptor Scoped<TService>(Func<IServiceProvider, TService> implementationFactory)
Creates an instance of ServiceDescriptor with the specified
TService, implementationFactory,
and the Scoped lifetime.
public static ServiceDescriptor Scoped(Type service, Func<IServiceProvider, object> implementationFactory)
Creates an instance of ServiceDescriptor with the specified
service, implementationFactory,
and the Scoped lifetime.
public static ServiceDescriptor Singleton<TService, TImplementation>() where TImplementation : TService
Creates an instance of ServiceDescriptor with the specified
TService, TImplementation,
and the Singleton lifetime.
Creates an instance of ServiceDescriptor with the specified
service and implementationType
and the Singleton lifetime.
public static ServiceDescriptor Singleton<TService, TImplementation>(Func<IServiceProvider, TImplementation> implementationFactory) where TImplementation : TService
Creates an instance of ServiceDescriptor with the specified
TService, TImplementation,
implementationFactory,
and the Singleton lifetime.
public static ServiceDescriptor Singleton<TService>(Func<IServiceProvider, TService> implementationFactory)
Creates an instance of ServiceDescriptor with the specified
TService, implementationFactory,
and the Singleton lifetime.
public static ServiceDescriptor Singleton(Type serviceType, Func<IServiceProvider, object> implementationFactory)
Creates an instance of ServiceDescriptor with the specified
serviceType, implementationFactory,
and the Singleton lifetime.
Creates an instance of ServiceDescriptor with the specified
TService, implementationInstance,
and the Scoped lifetime.
Creates an instance of ServiceDescriptor with the specified
serviceType, implementationInstance,
and the Scoped lifetime.
public static ServiceDescriptor Transient<TService, TImplementation>() where TImplementation : TService
Creates an instance of ServiceDescriptor with the specified
TService, TImplementation,
and the Transient lifetime.
Creates an instance of ServiceDescriptor with the specified
service and implementationType
and the Transient lifetime.
public static ServiceDescriptor Transient<TService, TImplementation>(Func<IServiceProvider, TImplementation> implementationFactory) where TImplementation : TService
Creates an instance of ServiceDescriptor with the specified
TService, TImplementation,
implementationFactory,
and the Transient lifetime.
public static ServiceDescriptor Transient<TService>(Func<IServiceProvider, TService> implementationFactory)
Creates an instance of ServiceDescriptor with the specified
TService, implementationFactory,
and the Transient lifetime.
public static ServiceDescriptor Transient(Type service, Func<IServiceProvider, object> implementationFactory)
Creates an instance of ServiceDescriptor with the specified
service, implementationFactory,
and the Transient lifetime.