Class ServiceActivatorAttribute
Marks a constructor to be used by the injector. Useful in case of multiple constructors.
class MyService
{
[ServiceActivator]
public MyService(IDependency dep) : this(dep, 1986) {...}
public MyService(IDependency dep, int foo) {...}
}
Inheritance
System.Object
ServiceActivatorAttribute
Namespace: Solti.Utils.DI.Interfaces
Assembly: Solti.Utils.DI.Interfaces.dll
Syntax
public sealed class ServiceActivatorAttribute : Attribute
Remarks
You can annotate only one constructor (per type).
Constructors
ServiceActivatorAttribute()
Declaration
public ServiceActivatorAttribute()