Esempio n. 1
0
        public void Start()
        {
            if (OsInfo.IsNotWindows)
            {
                //Console.CancelKeyPress += (sender, eventArgs) => eventArgs.Cancel = true;
                //_cancelHandler = new CancelHandler();
            }

            _runtimeInfo.IsExiting = false;
            DbFactory.RegisterDatabase(_container);

            _container.Resolve <IEventAggregator>().PublishEvent(new ApplicationStartingEvent());

            if (_runtimeInfo.IsExiting)
            {
                return;
            }

            _hostController.StartServer();

            if (!_startupContext.Flags.Contains(StartupContext.NO_BROWSER) &&
                _configFileProvider.LaunchBrowser)
            {
                _browserService.LaunchWebUI();
            }

            _container.Resolve <IEventAggregator>().PublishEvent(new ApplicationStartedEvent());
        }
Esempio n. 2
0
        public void Start()
        {
            if (OsInfo.IsMono)
            {
                Console.CancelKeyPress += (sender, eventArgs) => LogManager.Configuration = null;
            }

            _runtimeInfo.IsRunning = true;
            _hostController.StartServer();

            if (!_startupContext.Flags.Contains(StartupContext.NO_BROWSER) &&
                _configFileProvider.LaunchBrowser)
            {
                _browserService.LaunchWebUI();
            }
        }
Esempio n. 3
0
        public void Start()
        {
            _hostController.StartServer();

            if (!_startupArguments.Flags.Contains(StartupArguments.NO_BROWSER) &&
                _runtimeInfo.IsUserInteractive &&
                _configFileProvider.LaunchBrowser)
            {
                try
                {
                    _logger.Info("Starting default browser. {0}", _hostController.AppUrl);
                    _processProvider.OpenDefaultBrowser(_hostController.AppUrl);
                }
                catch (Exception e)
                {
                    _logger.ErrorException("Failed to open URL in default browser.", e);
                }
            }

            _priorityMonitor.Start();
        }