mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-16 13:30:10 +00:00
23 lines
597 B
C#
23 lines
597 B
C#
|
|
using System;
|
||
|
|
|
||
|
|
namespace XCharts
|
||
|
|
{
|
||
|
|
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
|
||
|
|
public sealed class ComponentHandlerAttribute : Attribute
|
||
|
|
{
|
||
|
|
public readonly Type handler;
|
||
|
|
public readonly bool allowMultiple = true;
|
||
|
|
|
||
|
|
public ComponentHandlerAttribute(Type handler)
|
||
|
|
{
|
||
|
|
this.handler = handler;
|
||
|
|
this.allowMultiple = true;
|
||
|
|
}
|
||
|
|
|
||
|
|
public ComponentHandlerAttribute(Type handler, bool allowMultiple)
|
||
|
|
{
|
||
|
|
this.handler = handler;
|
||
|
|
this.allowMultiple = allowMultiple;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|