FromServicesAttribute
Forces a parameter to resolve from dependency injection services.
- Kind:
Class - Namespace: Repl
- Assembly:
Repl.Core - Source: src/Repl.Core/FromServicesAttribute.cs
Signature
Section titled “Signature”[AttributeUsage(AttributeTargets.Parameter)]public sealed class FromServicesAttribute : AttributeInheritance
Section titled “Inheritance”Constructors
Section titled “Constructors”FromServicesAttribute()
Section titled “FromServicesAttribute()”Creates an attribute that resolves from the default service registration.
public FromServicesAttribute()FromServicesAttribute(string)
Section titled “FromServicesAttribute(string)”Creates an attribute that resolves from a keyed service registration.
public FromServicesAttribute(string key)Parameters
Section titled “Parameters”key(string): Service key.
Properties
Section titled “Properties”Gets the optional keyed service identifier.
public string? Key { get; }