zhengyuxuan
2025-04-02 e7d1ef3eef4dcbec4f7fae27542e94cc0bbf89c8
LifePayment/LifePayment.Domain.Shared/Extension/EnumExtension.cs
@@ -165,6 +165,10 @@
    /// <returns></returns>
    public static string GetDescription(this object value)
    {
        if (value == null)
        {
            return null;
        }
        return value.GetType().GetMember(value.ToString() ?? string.Empty).FirstOrDefault()
                             ?.GetCustomAttribute<DescriptionAttribute>()?.Description;
    }