2014-10-11 06:57:02 +08:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Web;
|
|
|
|
|
using System.Web.Mvc;
|
|
|
|
|
using System.Web.Routing;
|
|
|
|
|
using System.Web.Http;
|
|
|
|
|
|
|
|
|
|
namespace BuildFeed
|
|
|
|
|
{
|
|
|
|
|
public class RouteConfig
|
|
|
|
|
{
|
|
|
|
|
public static void RegisterRoutes(RouteCollection routes)
|
|
|
|
|
{
|
|
|
|
|
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
|
|
|
|
|
|
2015-05-30 22:14:09 +08:00
|
|
|
|
routes.MapHttpRoute(
|
|
|
|
|
name: "API",
|
|
|
|
|
routeTemplate: "api/{action}/{id}",
|
|
|
|
|
defaults: new { controller = "api", action = "GetBuilds", id = UrlParameter.Optional }
|
|
|
|
|
);
|
|
|
|
|
|
2014-10-11 06:57:02 +08:00
|
|
|
|
routes.AppendTrailingSlash = true;
|
|
|
|
|
|
2015-03-12 07:30:11 +08:00
|
|
|
|
routes.MapMvcAttributeRoutes();
|
2014-10-11 06:57:02 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|