/* public void ensureTMEndpointsBehavioursAreMapped() * { * if (serviceHostBase.isNull() || serviceHostBase.Description.isNull()) * return; * if (tmWebHttpBehavior.notNull()) // it is already set * return; * var endpoints = serviceHostBase.Description.Endpoints; * if (endpoints.Count > 0) * { * var behaviours = endpoints[0].Behaviors; * * originalWebHttpBehaviour = behaviours.Find<WebHttpBehavior>(); * //behaviours.Remove(originalWebHttpBehaviour); * * tmWebHttpBehavior = new TMWebHttpBehavior(); * endpoints[0].Behaviors.Add(tmWebHttpBehavior); * } * }*/ public static void SetRouteTable() { webServiceHostFactory = new TMWebServiceHostFactory(); serviceRoute = new ServiceRoute(urlPath, webServiceHostFactory, typeof(TM_REST)); RouteTable.Routes.Add(serviceRoute); //RouteTable.Routes.Add(new ServiceRoute(urlPath_Tests, new WebServiceHostFactory(), typeof(REST_Tests))); }
public static void SetRouteTable() { webServiceHostFactory = new TMWebServiceHostFactory(); serviceRoute = new ServiceRoute(urlPath, webServiceHostFactory, typeof (TM_REST)); RouteTable.Routes.Add(serviceRoute); }