public async Task RunAsyc() { _logger.InfoFormat("Start App..."); AppDomain.CurrentDomain.ProcessExit += async(sender, eventArgs) => await StopAsync(); Console.CancelKeyPress += async(sender, e) => { await StopAsync(); e.Cancel = true; }; await _manager.StartAsync(); }