This repository has been archived on 2024-12-22. You can view files and clone it, but cannot push or open issues or pull requests.
elliebot/src/Ellie.Marmalade/Attributes/svcAttribute.cs

24 lines
473 B
C#
Raw Normal View History

2024-05-12 23:43:23 +12:00
namespace EllieBot.Marmalade;
2024-03-23 18:42:46 +13:00
/// <summary>
/// Marks the class as a service which can be used within the same Marmalade
2024-03-23 18:42:46 +13:00
/// </summary>
[AttributeUsage(AttributeTargets.Class)]
public class svcAttribute : Attribute
{
public Lifetime Lifetime { get; }
public svcAttribute(Lifetime lifetime)
{
Lifetime = lifetime;
}
}
/// <summary>
/// Lifetime for <see cref="svcAttribute"/>
/// </summary>
public enum Lifetime
{
Singleton,
Transient
}