/// <summary> /// 根据类型获取常量集合 /// </summary> /// <param name="objType"></param> /// <returns></returns> public static List <EnumInfo> GetInfos(Type objType) { MassInfo info = GetMassInfos(objType); if (info != null) { return(info.LstInfo); } return(null); }
/// <summary> /// 根据类型获取常量集合 /// </summary> /// <param name="objType"></param> /// <returns></returns> public static MassInfo GetMassInfos(Type objType) { string fullName = objType.FullName; MassInfo ret = null; if (!_dicMass.TryGetValue(fullName, out ret)) { ret = new MassInfo(); GetInfos(objType, ret.LstInfo, ret.DicInfos); _dicMass[fullName] = ret; } return(ret); }