ServiceDescriptor ServiceDescriptor ServiceDescriptor Class

Definition

Describes a service with its service type, implementation, and lifetime.

public class ServiceDescriptor
type ServiceDescriptor = class
Public Class ServiceDescriptor
Inheritance
ServiceDescriptorServiceDescriptorServiceDescriptor

Constructors

ServiceDescriptor(Type, Object) ServiceDescriptor(Type, Object) ServiceDescriptor(Type, Object)

Initializes a new instance of ServiceDescriptor with the specified instance as a Singleton.

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

Initializes a new instance of ServiceDescriptor with the specified factory.

ServiceDescriptor(Type, Type, ServiceLifetime) ServiceDescriptor(Type, Type, ServiceLifetime) ServiceDescriptor(Type, Type, ServiceLifetime)

Initializes a new instance of ServiceDescriptor with the specified implementationType.

Properties

ImplementationFactory ImplementationFactory ImplementationFactory
ImplementationInstance ImplementationInstance ImplementationInstance
ImplementationType ImplementationType ImplementationType
Lifetime Lifetime Lifetime
ServiceType ServiceType ServiceType

Methods

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

Creates an instance of ServiceDescriptor with the specified serviceType, implementationFactory, and lifetime.

Describe(Type, Type, ServiceLifetime) Describe(Type, Type, ServiceLifetime) Describe(Type, Type, ServiceLifetime)

Creates an instance of ServiceDescriptor with the specified serviceType, implementationType, and lifetime.

Scoped(Type, Func<IServiceProvider,Object>) Scoped(Type, Func<IServiceProvider,Object>) Scoped(Type, Func<IServiceProvider,Object>)

Creates an instance of ServiceDescriptor with the specified service, implementationFactory, and the Scoped lifetime.

Scoped(Type, Type) Scoped(Type, Type) Scoped(Type, Type)

Creates an instance of ServiceDescriptor with the specified service and implementationType and the Scoped lifetime.

Scoped<TService,TImplementation>() Scoped<TService,TImplementation>() Scoped<TService,TImplementation>()

Creates an instance of ServiceDescriptor with the specified TService, TImplementation, and the Scoped lifetime.

Scoped<TService,TImplementation>(Func<IServiceProvider,TImplementation>) Scoped<TService,TImplementation>(Func<IServiceProvider,TImplementation>) Scoped<TService,TImplementation>(Func<IServiceProvider,TImplementation>)

Creates an instance of ServiceDescriptor with the specified TService, TImplementation, implementationFactory, and the Scoped lifetime.

Scoped<TService>(Func<IServiceProvider,TService>) Scoped<TService>(Func<IServiceProvider,TService>) Scoped<TService>(Func<IServiceProvider,TService>)

Creates an instance of ServiceDescriptor with the specified TService, implementationFactory, and the Scoped lifetime.

Singleton(Type, Func<IServiceProvider,Object>) Singleton(Type, Func<IServiceProvider,Object>) Singleton(Type, Func<IServiceProvider,Object>)

Creates an instance of ServiceDescriptor with the specified serviceType, implementationFactory, and the Singleton lifetime.

Singleton(Type, Object) Singleton(Type, Object) Singleton(Type, Object)

Creates an instance of ServiceDescriptor with the specified serviceType, implementationInstance, and the Scoped lifetime.

Singleton(Type, Type) Singleton(Type, Type) Singleton(Type, Type)

Creates an instance of ServiceDescriptor with the specified service and implementationType and the Singleton lifetime.

Singleton<TService,TImplementation>() Singleton<TService,TImplementation>() Singleton<TService,TImplementation>()

Creates an instance of ServiceDescriptor with the specified TService, TImplementation, and the Singleton lifetime.

Singleton<TService,TImplementation>(Func<IServiceProvider,TImplementation>) Singleton<TService,TImplementation>(Func<IServiceProvider,TImplementation>) Singleton<TService,TImplementation>(Func<IServiceProvider,TImplementation>)

Creates an instance of ServiceDescriptor with the specified TService, TImplementation, implementationFactory, and the Singleton lifetime.

Singleton<TService>(Func<IServiceProvider,TService>) Singleton<TService>(Func<IServiceProvider,TService>) Singleton<TService>(Func<IServiceProvider,TService>)

Creates an instance of ServiceDescriptor with the specified TService, implementationFactory, and the Singleton lifetime.

Singleton<TService>(TService) Singleton<TService>(TService) Singleton<TService>(TService)

Creates an instance of ServiceDescriptor with the specified TService, implementationInstance, and the Scoped lifetime.

Transient(Type, Func<IServiceProvider,Object>) Transient(Type, Func<IServiceProvider,Object>) Transient(Type, Func<IServiceProvider,Object>)

Creates an instance of ServiceDescriptor with the specified service, implementationFactory, and the Transient lifetime.

Transient(Type, Type) Transient(Type, Type) Transient(Type, Type)

Creates an instance of ServiceDescriptor with the specified service and implementationType and the Transient lifetime.

Transient<TService,TImplementation>() Transient<TService,TImplementation>() Transient<TService,TImplementation>()

Creates an instance of ServiceDescriptor with the specified TService, TImplementation, and the Transient lifetime.

Transient<TService,TImplementation>(Func<IServiceProvider,TImplementation>) Transient<TService,TImplementation>(Func<IServiceProvider,TImplementation>) Transient<TService,TImplementation>(Func<IServiceProvider,TImplementation>)

Creates an instance of ServiceDescriptor with the specified TService, TImplementation, implementationFactory, and the Transient lifetime.

Transient<TService>(Func<IServiceProvider,TService>) Transient<TService>(Func<IServiceProvider,TService>) Transient<TService>(Func<IServiceProvider,TService>)

Creates an instance of ServiceDescriptor with the specified TService, implementationFactory, and the Transient lifetime.

Applies to