增加MainComponent的order设置执行优先级

This commit is contained in:
monitor1394
2024-01-11 22:34:18 +08:00
parent 318bdcb1f2
commit 29e9593179
3 changed files with 8 additions and 2 deletions

View File

@@ -7,17 +7,20 @@ namespace XCharts.Runtime
{
public readonly Type handler;
public readonly bool allowMultiple = true;
public readonly int order = 3;
public ComponentHandlerAttribute(Type handler)
public ComponentHandlerAttribute(Type handler, int order = 3)
{
this.handler = handler;
this.allowMultiple = true;
this.order = order;
}
public ComponentHandlerAttribute(Type handler, bool allowMultiple)
public ComponentHandlerAttribute(Type handler, bool allowMultiple, int order = 3)
{
this.handler = handler;
this.allowMultiple = allowMultiple;
this.order = order;
}
}
}