Files
MegghysAPI/Attributes/AutoInitAttribute.cs
2025-02-25 22:28:49 +08:00

26 lines
656 B
C#

namespace MegghysAPI.Attributes
{
[AttributeUsage(AttributeTargets.Method)]
public class AutoInitAttribute : Attribute
{
public AutoInitAttribute()
{
}
public AutoInitAttribute(Action postInit)
{
PostInit = postInit;
}
public AutoInitAttribute(string log)
{
LogMessage = log;
}
/// <summary>
/// 越低越优先
/// </summary>
public int Order { get; set; } = 10;
public string LogMessage { get; set; }
public Action PostInit { get; set; }
public bool Async { get; set; } = false;
}
}