elliebot/src/Ellie.Marmalade/Attributes/svcAttribute.cs
2024-03-23 18:42:46 +13:00

23 lines
464 B
C#

namespace Ellie.Canary;
/// <summary>
/// Marks the class as a service which can be used within the same Medusa
/// </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
}