Пример #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;
        }