Table of Contents

Class InjectAttribute

Namespace
Anvil.Services
Assembly
NWN.Anvil.dll

Indicates a property as a service dependency to be injected.

[AttributeUsage(AttributeTargets.Property)]
public sealed class InjectAttribute : Attribute
Inheritance
InjectAttribute
Inherited Members
Extension Methods

Constructors

InjectAttribute()

Initializes a new instance of the InjectAttribute class.

InjectAttribute(string)

Initializes a new instance of the InjectAttribute class.

Properties

Optional

Marks this dependency as optional. Optional dependencies do not throw exceptions if the service is not available.

ServiceName

Gets the name of the service to be injected.