public List <UspMenu> getMenus()
        {
            var menus = from controller in AssemblyUtil.GetAllSubTypesEnum(typeof(Controller))
                        from attribute in controller.GetCustomAttributes(typeof(Menu), false)
                        where attribute != null
                        select new UspMenu(((Menu)attribute).Icon, ((Menu)attribute).Name);

            return(menus.ToList());;
        }
        public List <UspController> getControllers()
        {
            var controllers = from controller in AssemblyUtil.GetAllSubTypesEnum(typeof(Controller))
                              from action in controller.GetMethods(BindingFlags.Instance | BindingFlags.Public | BindingFlags.DeclaredOnly)
                              where !action.IsSpecialName
                              select new UspController(controller.FullName, GetAreaName(controller.FullName), GetControllerName(controller.FullName), action.Name, string.Join(",", action.GetParameters().Select(p => p.Name).ToArray()));

            return(controllers.ToList());
        }
        public List <UspPrivilege> getPrivileges()
        {
            var privileges = from controller in AssemblyUtil.GetAllSubTypesEnum(typeof(Controller))
                             from action in controller.GetMethods(BindingFlags.Instance | BindingFlags.Public | BindingFlags.DeclaredOnly)
                             where !action.IsSpecialName
                             from attribute in action.GetCustomAttributes(typeof(Privilege), false)
                             where attribute != null
                             select new UspPrivilege(((Privilege)attribute).Menu, ((Privilege)attribute).Parent, ((Privilege)attribute).Name, controller.FullName, GetAreaName(controller.FullName), GetControllerName(controller.FullName), action.Name, string.Join(",", action.GetParameters().Select(p => p.Name).ToArray()));

            return(privileges.ToList());;
        }