ServiceDescriptor Class

Definition

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

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

Constructors

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

Initializes a new instance of ServiceDescriptor with the specified factory.

ServiceDescriptor(Type, Object)

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

ServiceDescriptor(Type, Type, ServiceLifetime)

Initializes a new instance of ServiceDescriptor with the specified implementationType.

Properties

ImplementationFactory
ImplementationInstance
ImplementationType
Lifetime
ServiceType

Methods

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

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

Describe(Type, Type, ServiceLifetime)

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

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

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

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

Scoped(Type, Type)

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

Scoped<TService,TImplementation>()

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

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>)

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

Singleton(Type, Func<IServiceProvider,Object>)

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

Singleton(Type, Object)

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

Singleton(Type, Type)

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

Singleton<TService,TImplementation>()

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

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>)

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

Singleton<TService>(TService)

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

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

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

Transient(Type, Type)

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

Transient<TService,TImplementation>()

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

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>)

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

Applies to