상속: System.ServiceModel.Activation.WebServiceHostFactory
예제 #1
0
파일: TM_REST.cs 프로젝트: sarvaje/Master
/*        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)));
        }
예제 #2
0
파일: TM_REST.cs 프로젝트: TeamMentor/Dev
 public static void SetRouteTable()
 {
     webServiceHostFactory = new TMWebServiceHostFactory();
     serviceRoute = new ServiceRoute(urlPath, webServiceHostFactory, typeof (TM_REST));
     RouteTable.Routes.Add(serviceRoute);
 }