//----------------------------------------------------------------------------- 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); }
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); }
//----------------------------------------------------------------------------- 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; }
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; }