Class TypeRegistrationItem<TService, TImplementation>
Describes a type mapping that should be registered with .NET Core dependency injection.
Implements
Inherited Members
Namespace: Benday.Common
Assembly: Benday.Common.dll
Syntax
public class TypeRegistrationItem<TService, TImplementation> : ITypeRegistrationItem where TService : class where TImplementation : class, TService
Type Parameters
Name | Description |
---|---|
TService | Service type or interface type |
TImplementation | Implementation type |
Constructors
| Improve this Doc View SourceTypeRegistrationItem(ServiceLifetime)
Constructor
Declaration
public TypeRegistrationItem(ServiceLifetime lifetime = ServiceLifetime.Transient)
Parameters
Type | Name | Description |
---|---|---|
ServiceLifetime | lifetime | What is the instancing lifetime for this type registration? |
Properties
| Improve this Doc View SourceImplementationType
Implementation type
Declaration
public Type ImplementationType { get; }
Property Value
Type | Description |
---|---|
Type |
Lifetime
Instancing lifetime for this type mapping
Declaration
public ServiceLifetime Lifetime { get; set; }
Property Value
Type | Description |
---|---|
ServiceLifetime |
ServiceType
Service or interface type
Declaration
public Type ServiceType { get; }
Property Value
Type | Description |
---|---|
Type |