mirror of
https://github.com/Megghy/MegghysAPI.git
synced 2025-12-06 14:16:56 +08:00
添加项目文件。
This commit is contained in:
25
Attributes/AutoInitAttribute.cs
Normal file
25
Attributes/AutoInitAttribute.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user