属性反射生成界面基本框架。
修复懒加载框的布局问题。
This commit is contained in:
@@ -1,7 +1,22 @@
|
||||
namespace XericUI.ReflectionUIGenerator
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
|
||||
namespace XericUI.ReflectionUIGenerator
|
||||
{
|
||||
public static class XuiavrgUtilities
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 获取所有运行时成员(字段和属性)
|
||||
/// </summary>
|
||||
/// <param name="type"></param>
|
||||
/// <returns></returns>
|
||||
public static IEnumerable<MemberInfo> GetRuntimeMemberInfo(this Type type)
|
||||
{
|
||||
foreach (var field in type.GetRuntimeFields())
|
||||
yield return field;
|
||||
foreach (var property in type.GetRuntimeProperties())
|
||||
yield return property;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user