| 123456789101112131415161718192021222324252627282930 |
- using System;
- using TeamAAS.Feeder.Enums;
- namespace TeamAAS.Feeder.Attributes
- {
- /// <summary>
- /// 供料器实现描述特性,用于反射发现。标记在实现 <see cref="Interfaces.IFeeder"/> 的类上。
- /// </summary>
- [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
- public class FeederAttribute : Attribute
- {
- public string DisplayName { get; }
- public FeederBrand Brand { get; }
- public string Description { get; set; } = "";
- /// <summary>
- /// 品牌专属调试页类型(必须是 <c>System.Windows.FrameworkElement</c> 的子类,且建议实现
- /// <c>TeamAAS.Feeder.UI.IFeederDebugPage</c> 以接收供料器实例)。
- /// 为 null(默认)时,宿主使用通用的手动调试面板。
- /// 用法:[Feeder("Afag 供料器", FeederBrand.Afag, DebugPageType = typeof(AfagFeederDebugPage))]
- /// </summary>
- public Type DebugPageType { get; set; }
- public FeederAttribute(string displayName, FeederBrand brand)
- {
- DisplayName = displayName;
- Brand = brand;
- }
- }
- }
|