static async void AsyncExec(GUIOPtion option) { try { await new AddTask() { option = option }.Exec(); } catch (Exception e) { Console.WriteLine(e.Message); } TaskSupport.Finish(); }
static void Main(string[] args) { try { TaskSupport.SetSynchronizationContext(); AsyncExec(new GUIOPtion(args)); TaskSupport.EnterMessageLoop(); } catch (Exception e) { Console.WriteLine(e.Message); GUIOPtion.PrintHelp(); return; } }