-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRoutes.cs
31 lines (29 loc) · 957 Bytes
/
Routes.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
using System.Collections.Generic;
using Orchard.Mvc.Routes;
using Orchard.WebApi.Routes;
namespace Windsong.VersionManager
{
public class Routes : IHttpRouteProvider
{
public void GetRoutes(ICollection<RouteDescriptor> routes)
{
foreach (var routeDescriptor in GetRoutes())
routes.Add(routeDescriptor);
}
public IEnumerable<RouteDescriptor> GetRoutes()
{
return new[] {
new HttpRouteDescriptor {
Name = "SetReadOnlyState",
Priority = 0,
RouteTemplate = "Windsong.VersionManager/SetReadOnlyState/{id}/{isReadOnly}",
Defaults = new {
area = "Windsong.VersionManager",
controller = "Admin",
action = "SetReadOnlyState"
}
}
};
}
}
}