Files
SPT-Server-Build/Libraries/SPTarkov.Common/Annotations/Injectable.cs
T
2025-03-07 13:16:43 +00:00

31 lines
605 B
C#

namespace SPTarkov.Common.Annotations;
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = false)]
public class Injectable(InjectionType injectionType = InjectionType.Scoped, Type? type = null, int typePriority = int.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
}