Пример #1
0
        public AException(ErrorCode errorCode)
        {
            var enumDescription = EnumWrapper.GetEnumDescription(errorCode);

            ErrorCode = (int)errorCode;
            ZHMessage = enumDescription.ZH;
            ENMessage = enumDescription.EN;
        }
Пример #2
0
        public dynamic GetList()
        {
            return(Enum.GetNames(typeof(PermissionCode)).Select(pc =>
            {
                var permissionCode = Enum.Parse(typeof(PermissionCode), pc);
                var desc = EnumWrapper.GetEnumDescription(permissionCode);

                return new
                {
                    desc.EN,
                    desc.ZH,
                    Code = ((int)permissionCode).ToString()
                };
            }).ToList());
        }