예제 #1
0
        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);
        }
예제 #2
0
        /// <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();
        }
예제 #3
0
        /// <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;
        }