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!"); } }
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(); } }
protected override void PreStart() { _startupManager = IoC.Get <IWpfStartupManager>(); StartupSequence.Start(_startupManager); Environment.Exit(IoC.Get <SixElevatedService>().Run(Common.Flags.FullStartupParameters)); }