mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-10 09:18:27 -04:00
Read about the medusa system [here](https://nadekobot.readthedocs.io/en/latest/medusa/creating-a-medusa/)
24 lines
464 B
C#
24 lines
464 B
C#
namespace Nadeko.Snake;
|
|
|
|
/// <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
|
|
}
|