Class InjectAttribute

Marks a property to be resolved:

class DependantService: IDependantService
{
    [Inject]
    public IDependencyService Dependency { get; init; }
}
Inheritance
System.Object
InjectAttribute
Namespace: Solti.Utils.DI.Interfaces
Assembly: Solti.Utils.DI.Interfaces.dll
Syntax
public sealed class InjectAttribute : Attribute
Remarks

The target property must be writable.

Constructors

InjectAttribute()

Declaration
public InjectAttribute()
In This Article
Back to top Generated by DocFX