Files
Orchard/src/Orchard.Web/Modules/Orchard.Dashboards/Routes.cs
2015-05-04 19:40:11 +02:00

31 lines
1.0 KiB
C#

using System.Collections.Generic;
using System.Web.Mvc;
using System.Web.Routing;
using Orchard.Mvc.Routes;
namespace Orchard.Dashboards {
public class Routes : IRouteProvider {
public void GetRoutes(ICollection<RouteDescriptor> routes) {
foreach (var routeDescriptor in GetRoutes())
routes.Add(routeDescriptor);
}
public IEnumerable<RouteDescriptor> GetRoutes() {
yield return new RouteDescriptor {
Priority = -4,
Route = new Route(
"Admin",
new RouteValueDictionary {
{"area", "Orchard.Dashboards"},
{"controller", "Admin"},
{"action", "Index"}
},
new RouteValueDictionary(),
new RouteValueDictionary {
{"area", "Orchard.Dashboards"}
},
new MvcRouteHandler())
};
}
}
}