Files
SPT-Server-Build/Core/Annotations/Injectable.cs
T
2025-01-07 17:28:49 +00:00

16 lines
480 B
C#

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