mirror of
https://github.com/Megghy/MegghysAPI.git
synced 2025-12-06 22:26:56 +08:00
26 lines
656 B
C#
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;
|
|
}
|
|
}
|