Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
31 lines (26 sloc) 901 Bytes
using System.Collections.Generic;
using System.Web;
using Orchard.Mvc.Routes;
using System.Linq;
using Orchard.WebApi.Routes;
using System.Web.Http;
namespace Morphous.AsyncShapes {
public class MorphousApiHttpRouteProvider : IHttpRouteProvider {
public MorphousApiHttpRouteProvider() {
}
public IEnumerable<RouteDescriptor> GetRoutes() {
return new[] {
new HttpRouteDescriptor {
Name = "MorphousApiItem",
Priority = 100,
RouteTemplate = "api/Contents/Item/{id}",
Defaults = new { area = "Morphous.Api", controller = "Item" }
}
};
}
public void GetRoutes(ICollection<RouteDescriptor> routes) {
foreach (var routeDescriptor in GetRoutes())
routes.Add(routeDescriptor);
}
}
}
You can’t perform that action at this time.