refactor: 将Framework库和RT、UI放在同一个解决方案中。

This commit is contained in:
SL
2026-06-01 17:48:28 +08:00
parent 1948f4290d
commit b73d39a6b1
4331 changed files with 506148 additions and 49363 deletions
@@ -0,0 +1,27 @@
using System;
using System.Collections;
using System.Linq;
namespace Sicentury.Core.Extensions
{
public static class EnumExtensionMethods
{
public static string GetDescription(this Enum genericEnum)
{
var genericEnumType = genericEnum.GetType();
var memberInfo = genericEnumType.GetMember(genericEnum.ToString());
if ((memberInfo.Length <= 0))
return genericEnum.ToString();
var attributes = memberInfo[0]
.GetCustomAttributes(typeof(System.ComponentModel.DescriptionAttribute), false);
if ((attributes.Any()))
{
return ((System.ComponentModel.DescriptionAttribute)attributes.ElementAt(0)).Description;
}
return genericEnum.ToString();
}
}
}