public void OnExecute(Func <Task <int> > func)
 {
     Application.OnExecuteAsync((_) =>
     {
         DebugAttach();
         return(func());
     });
 }
 /// <summary>
 /// Sets an async handler with a return code of <c>0</c>.
 /// </summary>
 /// <param name="app"></param>
 /// <param name="action">An asynchronous action to invoke when the ocmmand is selected..</param>
 public static void OnExecuteAsync(this CommandLineApplication app, Func <CancellationToken, Task> action)
 => app.OnExecuteAsync(async ct =>
 {
     await action(ct);
     return(0);
 });