public static Boolean EqualWith(this ActionDetailModel detail, ActionDetailModel other)
 {
     if (other == null)
     {
         return(false);
     }
     return(detail.Id == other.Id && detail.Menuid == other.Menuid);
 }
        public Tuple <MenuDetailModel, ActionDetailModel> IdToMenu(String id)
        {
            String[]          arr    = id.Split(new String[] { "!&" }, StringSplitOptions.RemoveEmptyEntries);
            MenuDetailModel   menu   = m_menu[Convert.ToInt32(arr[0])];
            ActionDetailModel action = m_menutoaction[Convert.ToInt32(arr[0])].FirstOrDefault(item => item.Id == Convert.ToInt32(arr[1]));

            return(new Tuple <MenuDetailModel, ActionDetailModel>(menu, action));
        }
 public ActionDetailAttribute(Int32 id, String name, String des, String url)
 {
     this.Model             = new ActionDetailModel();
     this.Model.Id          = id;
     this.Model.Name        = name;
     this.Model.Description = des;
     this.Model.Url         = url;
 }
        public String ConvertRouteToId(String space, String controller, String index)
        {
            String fullname = $"{space}.{controller}";;

            if (!controller.EndsWith("Controller"))
            {
                fullname += "Controller";
            }
            MenuDetailModel   menu   = m_controller[fullname];
            ActionDetailModel action = m_menutoaction[Convert.ToInt32(menu.Id)].FirstOrDefault(item => item.Name == index);

            return(ConvertToId(action));
        }
 public String ConvertToId(ActionDetailModel detail)
 {
     return($"{detail.Menuid}!&{detail.Id}");
 }
 public ActionDetailAttribute(ActionDetailModel detail)
 {
     Model = detail;
 }