예제 #1
0
        /// <summary>
        /// Add mapped routes.
        /// </summary>
        public void MapRoute(string name, string regex, DefaultRoute defaults)
        {
            MappedRoute mappedRoute = new MappedRoute();
            mappedRoute.name = name;
            mappedRoute.regex = regex;
            mappedRoute.defaults = defaults;

            _mappedRoutes.Add(mappedRoute);
        }
예제 #2
0
        /// <summary>
        /// Add mapped routes.
        /// </summary>
        public void MapRoute(string name, string regex, DefaultRoute defaults)
        {
            MappedRoute mappedRoute = new MappedRoute();

            mappedRoute.name     = name;
            mappedRoute.regex    = regex;
            mappedRoute.defaults = defaults;

            _mappedRoutes.Add(mappedRoute);
        }
예제 #3
0
        /// <summary>
        /// Log the loaded routes.
        /// </summary>
        private void LogRoutes()
        {
            Logger.WriteInfo(this, "Ignored routes loaded from RouteConfig (HttpApplication) class:");
            foreach (string pattern in _routes.IngoredRoutes)
            {
                Logger.WriteInfo("  route regex: '" + pattern + "'");
            }

            Logger.WriteInfo(this, "Mapped routes loaded from RouteConfig (HttpApplication) class:");
            foreach (MappedRoute items in _routes.MappedRoutes)
            {
                MappedRoute  item  = items;
                DefaultRoute route = item.defaults;

                Logger.WriteInfo("  route name: '" + item.name +
                                 "' regex: '" + item.regex +
                                 "' => default: {controller='" + route.controller + "' action='" + route.action + "' id='" + route.id + "'}"
                                 );
            }
        }
예제 #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MatchResult"/> class.
 /// </summary>
 /// <param name="matchStatus"></param>
 /// <param name="mappedRoute"></param>
 public MatchResult(Match matchStatus, MappedRoute mappedRoute)
 {
     MatchStatus = matchStatus;
     MappedRoute = mappedRoute;
 }
예제 #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MatchResult"/> class.
 /// </summary>
 /// <param name="matchStatus"></param>
 /// <param name="mappedRoute"></param>
 public MatchResult(Match matchStatus, MappedRoute mappedRoute)
 {
     MatchStatus = matchStatus;
     MappedRoute = mappedRoute;
 }