Exemplo n.º 1
0
        protected override void Dispose(bool disposing)
        {
            base.Dispose(disposing);

            _customToolRunner.Dispose();
            CompositionHost.Dispose();
        }
Exemplo n.º 2
0
        /// <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);
            }
        }
Exemplo n.º 3
0
 public void Dispose()
 {
     _compositionHost.Dispose();
 }
        protected override void OnClose()
        {
            base.OnClose();

            _compositionHost.Dispose();
        }