Пример #1
0
        protected override async Task ExitAsync(object sender, EventArgs eventArgs)
        {
            await base.ExitAsync(sender, eventArgs).ConfigureAwait(false);

            if (_startupManager != null)
            {
                await Task.Run(() => StartupSequence.Exit(_startupManager)).ConfigureAwait(false);
            }
            else
            {
                MainLog.Logger.Error("StartupManager was null on exit!");
            }
        }
Пример #2
0
        static void Initialize()
        {
            AttachConsole(-1);
            CommonBase.AssemblyLoader = new AssemblyLoader(Assembly.GetEntryAssembly());
            // TODO
            ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;

            StartupSequence.PreInit(AppName);
            UpdaterApp.Launch();
            if (Common.OnExit != null)
            {
                Common.OnExit();
            }
        }
Пример #3
0
 protected override void PreStart()
 {
     _startupManager = IoC.Get <IWpfStartupManager>();
     StartupSequence.Start(_startupManager);
     Environment.Exit(IoC.Get <SixElevatedService>().Run(Common.Flags.FullStartupParameters));
 }