Class AutomaticContainerRegistrationAttribute
Used to set values to assist in automatically registering it with a DI container
Inheritance
Inherited Members
Namespace: VaraniumSharp.Attributes
Assembly: VaraniumSharp.dll
Syntax
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct)]
public class AutomaticContainerRegistrationAttribute : AutomaticContainerRegistrationBaseAttribute
Constructors
| Improve this Doc View SourceAutomaticContainerRegistrationAttribute(Type)
Construct attribute with service type and default reuse
Declaration
public AutomaticContainerRegistrationAttribute(Type serviceType)
Parameters
Type | Name | Description |
---|---|---|
Type | serviceType | The type that the service should be registered as |
AutomaticContainerRegistrationAttribute(Type, ServiceReuse)
Construct attribute with service type and reuse
Declaration
public AutomaticContainerRegistrationAttribute(Type serviceType, ServiceReuse reuse)
Parameters
Type | Name | Description |
---|---|---|
Type | serviceType | The type that the service should be registered as |
ServiceReuse | reuse | Indicate reuse policy for the service |
AutomaticContainerRegistrationAttribute(Type, ServiceReuse, Boolean)
Construct attribute with service type, reuse and multiple constructor flag
Declaration
public AutomaticContainerRegistrationAttribute(Type serviceType, ServiceReuse reuse, bool multipleConstructors)
Parameters
Type | Name | Description |
---|---|---|
Type | serviceType | The type that the service should be registered as |
ServiceReuse | reuse | Indicate reuse policy for the service |
Boolean | multipleConstructors | Indicate if the service has multiple constructors |
AutomaticContainerRegistrationAttribute(Type, ServiceReuse, Boolean, Int32)
Construct attribute with service type, reuse, multiple constructor flag and a priority
Declaration
public AutomaticContainerRegistrationAttribute(Type serviceType, ServiceReuse reuse, bool multipleConstructors, int priority)
Parameters
Type | Name | Description |
---|---|---|
Type | serviceType | The type that the service should be registered as |
ServiceReuse | reuse | Indicate reuse policy for the service |
Boolean | multipleConstructors | Indicate if the service has multiple constructors |
Int32 | priority | Priority of the class in case of multiple implementers. Higher values takes priority |
Properties
| Improve this Doc View SourcePriority
Injection priority of the class. This value is used when there are multiple implementation of the same class with the one with the highest priority being chosen. Default priority is 0
Declaration
public int Priority { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
ServiceType
The type that the service is registered as
Declaration
public Type ServiceType { get; }
Property Value
Type | Description |
---|---|
Type |