Medusa System Added

Read about the medusa system [here](https://nadekobot.readthedocs.io/en/latest/medusa/creating-a-medusa/)
This commit is contained in:
Kwoth
2022-04-16 12:44:46 +00:00
parent 3a516ab32a
commit 7cb15f5278
103 changed files with 3363 additions and 203 deletions

View File

@@ -0,0 +1,23 @@
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
}