/// <summary> /// Creates the embedded resource routes appending them to the /// MVC route table. /// </summary> public void Initialize() { var handler = new EmbeddedResourceRouteHandler(); foreach (var routeRegistration in _routeRegistrations) { foreach (var route in routeRegistration.GetEmbeddedResourcePaths()) { var formattedRoute = route.Trim('/') + "/{*pathInfo}"; RouteTable.Routes.Add(new Route(formattedRoute, handler)); } } }
/// <summary> /// Creates the embedded resource routes appending them to the /// MVC route table. /// </summary> public void Initialize() { var handler = new EmbeddedResourceRouteHandler(); foreach (var routeRegistration in _routeRegistrations) { foreach (var route in routeRegistration.GetEmbeddedResourcePaths()) { var formattedRoute = route.Trim('/') + "/{*pathInfo}"; // We need to supply a controller name to prevent it being picked up when asp.net generates routes for controllers var defaults = new RouteValueDictionary(new { controller = "DUMMMYVALUE" }); RouteTable.Routes.Add(new Route(formattedRoute, defaults, handler)); } } }