23 lines
473 B
C#
23 lines
473 B
C#
namespace EllieBot.Marmalade;
|
|
|
|
/// <summary>
|
|
/// Marks the class as a service which can be used within the same Marmalade
|
|
/// </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
|
|
}
|