Files
XCharts/Runtime/Internal/Attributes/ComponentHandlerAttribute.cs

26 lines
738 B
C#
Raw Normal View History

2021-11-23 13:20:07 +08:00
using System;
2022-02-19 22:37:57 +08:00
namespace XCharts.Runtime
2021-11-23 13:20:07 +08:00
{
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
public sealed class ComponentHandlerAttribute : Attribute
{
public readonly Type handler;
public readonly bool allowMultiple = true;
public readonly int order = 3;
2021-11-23 13:20:07 +08:00
public ComponentHandlerAttribute(Type handler, int order = 3)
2021-11-23 13:20:07 +08:00
{
this.handler = handler;
this.allowMultiple = true;
this.order = order;
2021-11-23 13:20:07 +08:00
}
public ComponentHandlerAttribute(Type handler, bool allowMultiple, int order = 3)
2021-11-23 13:20:07 +08:00
{
this.handler = handler;
this.allowMultiple = allowMultiple;
this.order = order;
2021-11-23 13:20:07 +08:00
}
}
}