public Service1() { InitializeComponent(); this.logger.Info($"This is Service1 ctor start..."); DispatchManager.Init().GetAwaiter().GetResult(); this.logger.Info($"This is Service1 ctor end..."); }
static void Main(string[] args) { try { DispatchManager.Init().GetAwaiter().GetResult(); } catch (Exception ex) { Console.WriteLine(ex.Message); } Console.Read(); }