Files
SPT-Server-Build/Core/Annotations/Injectable.cs
T
2025-01-06 01:43:58 -05:00

15 lines
387 B
C#

namespace Core.Annotations;
[AttributeUsage(AttributeTargets.Class)]
public class Injectable(InjectionType injectionType = InjectionType.Scoped, Type? type = null) : Attribute
{
public InjectionType InjectionType { get; set; } = injectionType;
public Type? InjectableTypeOverride { get; set; } = type;
}
public enum InjectionType
{
Singleton,
Transient,
Scoped
}