Startup.cs 841 B

1234567891011121314151617181920212223242526272829
  1. using Owin;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. using System.Web.Http;
  8. namespace CloudSimulator
  9. {
  10. public class Startup
  11. {
  12. // This code configures Web API. The Startup class is specified as a type
  13. // parameter in the WebApp.Start method.
  14. public void Configuration(IAppBuilder appBuilder)
  15. {
  16. // Configure Web API for self-host.
  17. HttpConfiguration config = new HttpConfiguration();
  18. config.MapHttpAttributeRoutes();
  19. config.Routes.MapHttpRoute(
  20. name: "DefaultApi",
  21. routeTemplate: "api/{controller}/{id}",
  22. defaults: new { id = RouteParameter.Optional }
  23. );
  24. appBuilder.UseWebApi(config);
  25. }
  26. }
  27. }