Anvil
Anvil.Services.InjectAttribute Class Reference

Indicates a property as a service dependency to be injected. More...

+ Inheritance diagram for Anvil.Services.InjectAttribute:
+ Collaboration diagram for Anvil.Services.InjectAttribute:

Public Member Functions

 InjectAttribute ()
 Initializes a new instance of the InjectAttribute class. More...
 
 InjectAttribute (string serviceName)
 Initializes a new instance of the InjectAttribute class. More...
 

Properties

bool Optional [get]
 Marks this dependency as optional. Optional dependencies do not throw exceptions if the service is not available. More...
 
string ServiceName [get]
 Gets the name of the service to be injected. More...
 

Detailed Description

Indicates a property as a service dependency to be injected.

Constructor & Destructor Documentation

◆ InjectAttribute() [1/2]

Anvil.Services.InjectAttribute.InjectAttribute ( )
inline

Initializes a new instance of the InjectAttribute class.

◆ InjectAttribute() [2/2]

Anvil.Services.InjectAttribute.InjectAttribute ( string  serviceName)
inline

Initializes a new instance of the InjectAttribute class.

Parameters
serviceNameThe name of the service to be injected.

Property Documentation

◆ Optional

bool Anvil.Services.InjectAttribute.Optional
get

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

◆ ServiceName

string Anvil.Services.InjectAttribute.ServiceName
get

Gets the name of the service to be injected.


The documentation for this class was generated from the following file: