public AppHostHttpListenerBase CreateHost(string serviceName = DefaultServiceName, Assembly serviceAssembly = null, Action<AppHostHttpListenerBase> configurationBuilder = null) { if (serviceAssembly == null) serviceAssembly = Assembly.GetCallingAssembly(); var appHost = new ServiceStackAppHost(serviceName, serviceAssembly, configurationBuilder); appHost.Init(); return appHost; }
public void StartHost(string urlBase, string serviceName = DefaultServiceName, Assembly serviceAssembly = null, Action<AppHostHttpListenerBase> configurationBuilder = null) { if (serviceAssembly == null) serviceAssembly = Assembly.GetCallingAssembly(); var appHost = new ServiceStackAppHost(serviceName, serviceAssembly, configurationBuilder); appHost.Init(); appHost.Start(urlBase); Console.WriteLine("Listening on {0}...", urlBase); Console.WriteLine("Press any key to stop."); Console.ReadLine(); }
public AppHostHttpListenerBase CreateHost(string serviceName = DefaultServiceName, Assembly serviceAssembly = null, Action <AppHostHttpListenerBase> configurationBuilder = null) { if (serviceAssembly == null) { serviceAssembly = Assembly.GetCallingAssembly(); } var appHost = new ServiceStackAppHost(serviceName, serviceAssembly, configurationBuilder); appHost.Init(); return(appHost); }
public void StartHost(string urlBase, string serviceName = DefaultServiceName, Assembly serviceAssembly = null, Action <AppHostHttpListenerBase> configurationBuilder = null) { if (serviceAssembly == null) { serviceAssembly = Assembly.GetCallingAssembly(); } var appHost = new ServiceStackAppHost(serviceName, serviceAssembly, configurationBuilder); appHost.Init(); appHost.Start(urlBase); Console.WriteLine("Listening on {0}...", urlBase); Console.WriteLine("Press any key to stop."); Console.ReadLine(); }