public void OnExecute(Func <Task <int> > func) { Application.OnExecute(() => { DebugAttach(); return(func()); }); }
private ReflectionAppBuilder(CommandLineApplication app) { App = app; App.OnExecute((Func <int>)OnExecute); _target = new TTarget(); }
/// <summary> /// Sets the command execution handler with a return code of <c>0</c>. /// </summary> /// <param name="app"></param> /// <param name="action">An action to invoke when the command is selected.</param> public static void OnExecute(this CommandLineApplication app, Action action) => app.OnExecute(() => { action(); return(0); });