Class KeyedServiceAttribute
use this attribute to mark a property to be auto injected from the DI container.
Inherited Members
Namespace: FastEndpoints
Assembly: FastEndpoints.Attributes.dll
Syntax
[AttributeUsage(AttributeTargets.Property)]
public sealed class KeyedServiceAttribute : Attribute
Constructors
KeyedServiceAttribute(string)
use this attribute to mark a property to be auto injected from the DI container.
Declaration
public KeyedServiceAttribute(string keyName)
Parameters
Type | Name | Description |
---|---|---|
string | keyName | the key name |
Properties
Key
the key to use for obtaining the service from the DI container.
Declaration
public string Key { get; }
Property Value
Type | Description |
---|---|
string |