/// <summary>Hosts a Basic HTTP service</summary> /// <param name="serviceType">Type of the service.</param> /// <param name="contractType">Type of the contract.</param> /// <param name="serviceId">The service id.</param> /// <param name="messageSize">Size of the message.</param> /// <param name="exposeWsdl">if set to <c>true</c> a WSDL endpoint is exposed.</param> /// <param name="baseAddress">The base address.</param> /// <param name="basePath">The base path.</param> /// <param name="extension">The extension.</param> /// <param name="useHttps">Indicates whether HTTPS should be used</param> public void AddServiceHostBasicHttp(Type serviceType, Type contractType = null, string serviceId = null, MessageSize messageSize = MessageSize.Undefined, bool exposeWsdl = false, string baseAddress = null, string basePath = null, string extension = null, bool useHttps = false) { Execute( () => ServiceGarden.AddServiceHostBasicHttp(serviceType, contractType, serviceId, messageSize, exposeWsdl, baseAddress, basePath, extension, useHttps), url => AddServiceInfo(serviceType, contractType, url, "Basic HTTP", ServiceGarden.GetHostByEndpointAddress(url)) ); }
/// <summary> /// Adds another service to the list of hosted services /// </summary> /// <param name="serviceType">Type of the service.</param> /// <param name="contractType">Type of the contract.</param> /// <param name="serviceId">The service id.</param> /// <param name="exposeWsdl">if set to <c>true</c> [expose WSDL].</param> public void AddServiceHostBasicHttp(Type serviceType, Type contractType, string serviceId, bool exposeWsdl) { Execute( () => ServiceGarden.AddServiceHostBasicHttp(serviceType, contractType, serviceId, exposeWsdl), url => AddServiceInfo(serviceType, contractType, url, "Basic HTTP", ServiceGarden.GetHostByEndpointAddress(url)) ); }
/// <summary>Adds a TCP/IP (net.tcp) service host</summary> /// <param name="serviceType">Type of the service.</param> /// <param name="contractType">Type of the contract.</param> /// <param name="serviceId">The service id.</param> /// <param name="messageSize">Size of the message.</param> public void AddServiceHostNetTcp(Type serviceType, Type contractType = null, string serviceId = null, MessageSize messageSize = MessageSize.Undefined) { var port = _basePort; _basePort++; Execute( () => ServiceGarden.AddServiceHostNetTcp(serviceType, contractType, serviceId, messageSize, port), url => AddServiceInfo(serviceType, contractType, url, "Net.Tcp", ServiceGarden.GetHostByEndpointAddress(url)) ); }
/// <summary> /// Adds another service to the list of hosted services /// </summary> /// <param name="serviceType">Type of the service.</param> /// <param name="exposeWsdl">if set to <c>true</c> [expose WSDL].</param> public void AddServiceHostBasicHttp(Type serviceType, bool exposeWsdl) { Execute( () => ServiceGarden.AddServiceHostBasicHttp(serviceType, exposeWsdl), url => AddServiceInfo(serviceType, serviceType.GetInterfaces()[0], url, "Basic HTTP", ServiceGarden.GetHostByEndpointAddress(url)) ); }
/// <summary>Adds a new REST service using JSON data format</summary> /// <param name="serviceType">Type of the service.</param> /// <param name="contractType">Type of the contract.</param> /// <param name="serviceId">The service id.</param> /// <param name="messageSize">Size of the message.</param> /// <param name="baseAddress">The base address.</param> /// <param name="basePath">The base path.</param> /// <param name="extension">The extension.</param> /// <param name="useHttps">Indicates whether HTTPS should be used</param> public void AddServiceHostRestJson(Type serviceType, Type contractType = null, string serviceId = null, MessageSize messageSize = MessageSize.Undefined, string baseAddress = null, string basePath = null, string extension = null, bool useHttps = false) { Execute( () => ServiceGarden.AddServiceHostRestJson(serviceType, contractType, serviceId, messageSize, baseAddress, basePath, extension, useHttps), url => AddServiceInfo(serviceType, contractType, url, "REST HTTP (JSON)", ServiceGarden.GetHostByEndpointAddress(url)) ); }