dotnet / dotnet/command-line-api

What is the preferred flow of returning results from CommandHandler

Open
#583 2 comments 0 reactions 0 assignees View on GitHub
needs documentation
Dominant language
C#
Stars
3.7k
Forks
428
PR merge metrics
No merged PRs in 30d

Description

Should I just call Console.WriteLine in CommandHandler or is it somehow possible to return object and somewhere at lower level catch all result and do generic Render operation. Also I have cloned repo, and tried to get RenderingPlayground project to work, but it doesn't work as expected, I tried running this sample in cmd and powershell and both can't render many samples correcty. But if I change consoleRenderer OutputMode explicitly to Ansi it seems to start working, could you please provide basic scenario of real world usage of System.CommandLine.Rendering and maybe result handling from CommandHandler?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.