Exemple #1
0
        private void DaxStudioRibbon_Close(object sender, EventArgs e)
        {
            Log.Debug("{class} {method} {message}", "DaxStudioRibbon", "DaxStudioRibbon_Close", "Entering");
            try {
                // stop the web host
                WebHost.Stop();
            }
            catch (Exception ex)
            {
                Log.Error("{Class} {method} {exception} {stacktrace}", "DaxStudioRibbon", "DaxStudioRibbon_Close", ex.Message, ex.StackTrace);
            }

            Log.Debug("{class} {method} {message}", "DaxStudioRibbon", "DaxStudioRibbon_Close", "Exiting");

            // TODO - need to find a way to only shut down the UI if
            //        Dax Studio was launched from Excel

            // tell the DaxStudio.exe client to shutdown
            //if (_client != null)
            //{
            //    if (!_client.HasExited)
            //    {
            //        SetForegroundWindow(_client.MainWindowHandle);
            //        _client.CloseMainWindow();
            //    }
            //}
        }
Exemple #2
0
 /// <summary>
 /// 停止
 /// </summary>
 public void Stop()
 {
     try
     {
         webHost.Stop();
     }
     catch (Exception ex)
     {
         throw new Exception("关闭SAEA.MVCServer失败 err:" + ex.Message);
     }
 }
Exemple #3
0
        public void Run()
        {
            var uri  = "http://localhost:8080";
            var host = new WebHost(uri);

            host.Run();
            Console.WriteLine($"Service available at {uri}");
            Console.WriteLine("Press <enter> to stop the service");
            Console.ReadLine();
            host.Stop();
        }
Exemple #4
0
 /// <summary>
 /// 停止
 /// </summary>
 public void Stop()
 {
     try
     {
         _webHost.Stop();
         this.Running = false;
     }
     catch (Exception ex)
     {
         throw new Exception("关闭SAEAMvcApplication err:" + ex.Message);
     }
 }
Exemple #5
0
 internal void Stop()
 {
     _Server.Shutdown("Server is shutting down...");
     NetworkComms.Shutdown();
     _WebServer.Stop();
 }
Exemple #6
0
 private void Application_Exit(object sender, ExitEventArgs e)
 {
     WebHost.Stop();
     WebHost.Dispose();
 }