void StartAndRegisterServer(int port) { var server = new WebApiServer(); server.StartServer(port, () => Logger.Debug("Aufruf")); DiscoverableServer.Register("test", new Uri(string.Format("http://{1}:{0}", port, "localhost"))); _servers.Add(server); }
/// <summary> /// /// </summary> private void SeverInit() { bool res = Library.Helper.Environment.LoadEnvFile() ? true : false; LoadOrders(); // cant load sql repo // start up the webAPI server // and adding the method to the event WebApiServer.returnOrderEvent += ManageOrders; WebApiServer.StartServer(); }
/// <summary> /// /// </summary> private void SeverInit() { LoadOrders(); if (Global.IsServerStarted) { return; } // start up the webAPI server // and adding the method to the event WebApiServer.returnOrderEvent += ManageOrders; WebApiServer.StartServer(); Global.IsServerStarted = true; }