ServiceDescriptor Klass

Definition

Beskriver en tjänst med dess tjänsttyp, implementering och livslängd.

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

Konstruktorer

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

Initierar en ny instans av ServiceDescriptor med angiven factory.

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

Initierar en ny instans av ServiceDescriptor med angiven factory.

ServiceDescriptor(Type, Object, Object)

Initierar en ny instans av ServiceDescriptor med angiven instance som en Singleton.

ServiceDescriptor(Type, Object, Type, ServiceLifetime)

Initierar en ny instans av ServiceDescriptor med angiven implementationType.

ServiceDescriptor(Type, Object)

Initierar en ny instans av ServiceDescriptor med angiven instance som en Singleton.

ServiceDescriptor(Type, Type, ServiceLifetime)

Initierar en ny instans av ServiceDescriptor med angiven implementationType.

Egenskaper

Name Description
ImplementationFactory

Hämtar den fabrik som används för att skapa en tjänstinstans eller returnerar null om IsKeyedService är true.

ImplementationInstance

Hämtar den instans som implementerar tjänsten eller returnerar null om IsKeyedService är true.

ImplementationType

Type Hämtar som implementerar tjänsten eller returnerar null om IsKeyedService är true.

IsKeyedService

Anger om tjänsten är en nyckelbaserad tjänst.

KeyedImplementationFactory

Hämtar den fabrik som används för att skapa Keyed-tjänstinstanser eller genererar InvalidOperationException om IsKeyedService är false.

KeyedImplementationInstance

Hämtar den instans som implementerar tjänsten eller genererar InvalidOperationException om IsKeyedService är false.

KeyedImplementationType

Hämtar som Type implementerar tjänsten eller genererar InvalidOperationException om IsKeyedService är false.

Lifetime

ServiceLifetime Hämtar tjänsten.

ServiceKey

Hämta nyckeln för tjänsten, om tillämpligt.

ServiceType

Type Hämtar tjänsten.

Metoder

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

Skapar en instans av ServiceDescriptor med angiven serviceType, implementationFactoryoch lifetime.

Describe(Type, Type, ServiceLifetime)

Skapar en instans av ServiceDescriptor med angiven serviceType, implementationTypeoch lifetime.

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

Skapar en instans av ServiceDescriptor med angiven serviceType, implementationFactoryoch lifetime.

DescribeKeyed(Type, Object, Type, ServiceLifetime)

Skapar en instans av ServiceDescriptor med angiven serviceType, implementationTypeoch lifetime.

Equals(Object)

Avgör om det angivna objektet är lika med det aktuella objektet.

(Ärvd från Object)
GetHashCode()

Fungerar som standard-hash-funktion.

(Ärvd från Object)
GetType()

Hämtar den aktuella instansen Type .

(Ärvd från Object)
KeyedScoped(Type, Object, Func<IServiceProvider,Object,Object>)

Skapar en instans av ServiceDescriptor med angiven service, implementationFactoryoch livslängd.Scoped

KeyedScoped(Type, Object, Type)

Skapar en instans av ServiceDescriptor med angiven service och implementationType och livslängd.Scoped

KeyedScoped<TService,TImplementation>(Object, Func<IServiceProvider,Object,TImplementation>)

Skapar en instans av ServiceDescriptor med angiven TService, TImplementation, implementationFactoryoch Scoped livslängd.

KeyedScoped<TService,TImplementation>(Object)

Skapar en instans av ServiceDescriptor med angiven TService, TImplementationoch livslängd.Scoped

KeyedScoped<TService>(Object, Func<IServiceProvider,Object,TService>)

Skapar en instans av ServiceDescriptor med angiven TService, implementationFactoryoch livslängd.Scoped

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

Skapar en instans av ServiceDescriptor med angiven serviceType, implementationFactoryoch livslängd.Singleton

KeyedSingleton(Type, Object, Object)

Skapar en instans av ServiceDescriptor med angiven serviceType, implementationInstanceoch livslängd.Singleton

KeyedSingleton(Type, Object, Type)

Skapar en instans av ServiceDescriptor med angiven service och implementationType och livslängd.Singleton

KeyedSingleton<TService,TImplementation>(Object, Func<IServiceProvider,Object,TImplementation>)

Skapar en instans av ServiceDescriptor med angiven TService, TImplementation, implementationFactoryoch Singleton livslängd.

KeyedSingleton<TService,TImplementation>(Object)

Skapar en instans av ServiceDescriptor med angiven TService, TImplementationoch livslängd.Singleton

KeyedSingleton<TService>(Object, Func<IServiceProvider,Object,TService>)

Skapar en instans av ServiceDescriptor med angiven TService, implementationFactoryoch livslängd.Singleton

KeyedSingleton<TService>(Object, TService)

Skapar en instans av ServiceDescriptor med angiven TService, implementationInstanceoch livslängd.Singleton

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

Skapar en instans av ServiceDescriptor med angiven service, implementationFactoryoch livslängd.Transient

KeyedTransient(Type, Object, Type)

Skapar en instans av ServiceDescriptor med angiven service och implementationType och livslängd.Transient

KeyedTransient<TService,TImplementation>(Object, Func<IServiceProvider,Object,TImplementation>)

Skapar en instans av ServiceDescriptor med angiven TService, TImplementation, implementationFactoryoch Transient livslängd.

KeyedTransient<TService,TImplementation>(Object)

Skapar en instans av ServiceDescriptor med angiven TService, TImplementationoch livslängd.Transient

KeyedTransient<TService>(Object, Func<IServiceProvider,Object,TService>)

Skapar en instans av ServiceDescriptor med angiven TService, implementationFactoryoch livslängd.Transient

MemberwiseClone()

Skapar en ytlig kopia av den aktuella Object.

(Ärvd från Object)
Scoped(Type, Func<IServiceProvider,Object>)

Skapar en instans av ServiceDescriptor med angiven service, implementationFactoryoch livslängd.Scoped

Scoped(Type, Type)

Skapar en instans av ServiceDescriptor med angiven service och implementationType och livslängd.Scoped

Scoped<TService,TImplementation>()

Skapar en instans av ServiceDescriptor med angiven TService, TImplementationoch livslängd.Scoped

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

Skapar en instans av ServiceDescriptor med angiven TService, TImplementation, implementationFactoryoch Scoped livslängd.

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

Skapar en instans av ServiceDescriptor med angiven TService, implementationFactoryoch livslängd.Scoped

Singleton(Type, Func<IServiceProvider,Object>)

Skapar en instans av ServiceDescriptor med angiven serviceType, implementationFactoryoch livslängd.Singleton

Singleton(Type, Object)

Skapar en instans av ServiceDescriptor med angiven serviceType, implementationInstanceoch livslängd.Singleton

Singleton(Type, Type)

Skapar en instans av ServiceDescriptor med angiven service och implementationType och livslängd.Singleton

Singleton<TService,TImplementation>()

Skapar en instans av ServiceDescriptor med angiven TService, TImplementationoch livslängd.Singleton

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

Skapar en instans av ServiceDescriptor med angiven TService, TImplementation, implementationFactoryoch Singleton livslängd.

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

Skapar en instans av ServiceDescriptor med angiven TService, implementationFactoryoch livslängd.Singleton

Singleton<TService>(TService)

Skapar en instans av ServiceDescriptor med angiven TService, implementationInstanceoch livslängd.Singleton

ToString()

Returnerar en sträng som representerar det aktuella objektet.

Transient(Type, Func<IServiceProvider,Object>)

Skapar en instans av ServiceDescriptor med angiven service, implementationFactoryoch livslängd.Transient

Transient(Type, Type)

Skapar en instans av ServiceDescriptor med angiven service och implementationType och livslängd.Transient

Transient<TService,TImplementation>()

Skapar en instans av ServiceDescriptor med angiven TService, TImplementationoch livslängd.Transient

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

Skapar en instans av ServiceDescriptor med angiven TService, TImplementation, implementationFactoryoch Transient livslängd.

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

Skapar en instans av ServiceDescriptor med angiven TService, implementationFactoryoch livslängd.Transient

Gäller för