spectreconsole / spectre.console

A .NET library that makes it easier to create beautiful console applications.
https://spectreconsole.net
MIT License
9.45k stars 499 forks source link

enhanced async support #1116

Open althunibat opened 1 year ago

althunibat commented 1 year ago

few notes / enhancements that are recommended when handling async commands in a cli application.

When using async command in cli, it is recommended to add cancelation token to be passed to "ExecuteAsync" method console methods both in and out directions / write and read to have async version similar to: System.Console.Out.WriteLineAsync & System.Console.In.ReadLineAsync.

Thanks


Please upvote :+1: this issue if you are interested in it.

FrankRay78 commented 8 months ago

Related to/the same as: https://github.com/spectreconsole/spectre.console/issues/701, CLI Command RunAsync support passing in/propagating a CancelationToken