暫無描述
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ComponentHandlerAttribute.cs 605B

1234567891011121314151617181920212223
  1. using System;
  2. namespace XCharts.Runtime
  3. {
  4. [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
  5. public sealed class ComponentHandlerAttribute : Attribute
  6. {
  7. public readonly Type handler;
  8. public readonly bool allowMultiple = true;
  9. public ComponentHandlerAttribute(Type handler)
  10. {
  11. this.handler = handler;
  12. this.allowMultiple = true;
  13. }
  14. public ComponentHandlerAttribute(Type handler, bool allowMultiple)
  15. {
  16. this.handler = handler;
  17. this.allowMultiple = allowMultiple;
  18. }
  19. }
  20. }