示例#1
0
        //-----------------------------------------------------------------------------

        public static ForumAction GetByUrl(String url)
        {
            IList actions = new ForumAction().findAll();

            foreach (ForumAction a in actions)
            {
                if (a.Url.IndexOf(url) >= 0)
                {
                    return(a);
                }
            }
            return(null);
        }
示例#2
0
        private static ForumAction getForumAction(String typeFullName, String actionName, String rootNamespace)
        {
            String controllerAndAction = strUtil.TrimStart(typeFullName, rootNamespace);

            controllerAndAction = strUtil.TrimStart(controllerAndAction, ".").Replace(".", "/");
            controllerAndAction = strUtil.TrimEnd(controllerAndAction, "Controller");
            controllerAndAction = controllerAndAction + "/" + actionName;

            IList actions = new ForumAction().findAll();

            foreach (ForumAction a in actions)
            {
                if (a.Url.IndexOf(controllerAndAction) >= 0)
                {
                    return(a);
                }
            }
            return(null);
        }
示例#3
0
 //-----------------------------------------------------------------------------
 public static ForumAction GetByUrl( String url )
 {
     IList actions = new ForumAction().findAll();
     foreach (ForumAction a in actions) {
         if (a.Url.IndexOf( url ) >= 0) return a;
     }
     return null;
 }
示例#4
0
        private static ForumAction getForumAction( String typeFullName, String actionName, String rootNamespace )
        {
            String controllerAndAction = strUtil.TrimStart( typeFullName, rootNamespace );
            controllerAndAction = strUtil.TrimStart( controllerAndAction, "." ).Replace( ".", "/" );
            controllerAndAction = strUtil.TrimEnd( controllerAndAction, "Controller" );
            controllerAndAction = controllerAndAction + "/" + actionName;

            IList actions = new ForumAction().findAll();
            foreach (ForumAction a in actions) {
                if (a.Url.IndexOf( controllerAndAction ) >= 0) return a;
            }
            return null;
        }