using System; namespace TeamAAS.Camera.Attributes { [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)] public sealed class CameraAttribute : Attribute { public string DisplayName { get; } public string Brand { get; } public string Description { get; } /// /// 品牌专属调试页类型(必须是 System.Windows.FrameworkElement 的子类,且建议实现 /// TeamAAS.Camera.UI.ICameraDebugPage 以接收相机实例)。 /// 为 null(默认)时,宿主使用类库内置的通用调试页。 /// 用法:[Camera("康耐视 VisionPro", "康耐视 VisionPro", DebugPageType = typeof(CognexDebugPage))] /// public Type DebugPageType { get; set; } public CameraAttribute(string displayName, string brand, string description = "") { DisplayName = displayName; Brand = brand; Description = description; } } }