protected override void Dispose(bool disposing)
        {
            base.Dispose(disposing);

            _customToolRunner.Dispose();
            CompositionHost.Dispose();
        }
        /// <summary>
        /// Runs the server
        /// </summary>
        public static void RunServer()
        {
            var application = Application.Current;

            if (application == null)
            {
                application = new ServerApplication();
            }
            Log.Assert(0, application == Application.Current, "Failed to correctly create application");
            application.Dispatcher.BeginInvoke(new Action(() => ServeAsync().IgnoreAwait()));
            application.Run();

            _httpServer?.Dispose();
            _gllManager?.Dispose();
            _host?.Dispose();

            if (RestartServerOnClose)
            {
                var serverFileName = Assembly.GetEntryAssembly().Location;
                Process.Start(serverFileName);
            }
        }
Beispiel #3
0
 public void Dispose()
 {
     _compositionHost.Dispose();
 }
        protected override void OnClose()
        {
            base.OnClose();

            _compositionHost.Dispose();
        }