From 9d1660270272180cd71147d6ddd53d1382643d2e Mon Sep 17 00:00:00 2001
From: wenxiangchao <wenxiangchao@ihengxin.com.cn>
Date: 星期一, 02 十一月 2026 18:00:14 +0800
Subject: [PATCH] merge: 并入远程 Initial commit 作为历史根节点
---
HMI.Util/PropertyHelper.cs | 30 ++++++++++++++++++++++++++++++
1 files changed, 30 insertions(+), 0 deletions(-)
diff --git a/HMI.Util/PropertyHelper.cs b/HMI.Util/PropertyHelper.cs
new file mode 100644
index 0000000..2f1601c
--- /dev/null
+++ b/HMI.Util/PropertyHelper.cs
@@ -0,0 +1,30 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Reflection;
+
+namespace HMI.Util
+{
+ class PropertyHelper
+ {
+ public static List<PropertyInfo> GetAtterProperty<T, A>(out List<A> attrs) where A : Attribute
+ {
+ var result = new List<PropertyInfo>();
+ attrs = new List<A>();
+
+ var type = typeof(T);
+ var attrType = typeof(A);
+
+ PropertyInfo[] properties = type.GetProperties();
+
+ foreach (var prop in properties)
+ {
+ if (Attribute.IsDefined(prop, attrType))
+ {
+ result.Add(prop);
+ attrs.Add((A)Attribute.GetCustomAttribute(prop, attrType));
+ }
+ }
+ return result;
+ }
+ }
+}
--
Gitblit v1.9.1