Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rendering to a string? #12

Open
andrzejolszak opened this issue Jan 21, 2022 · 1 comment
Open

Rendering to a string? #12

andrzejolszak opened this issue Jan 21, 2022 · 1 comment

Comments

@andrzejolszak
Copy link

I was looking for a way to render Reports to a string (accepting drawbacks like losing the colors, monospace font requirement for display, etc.), and it seems that this would require implementing a special IAnsiConsole.

Do this sound viable, or would expect problems? Or maybe there is already a way to do this that I just haven't found?

Thanks!

@patriksvensson
Copy link
Contributor

@andrzejolszak Should be possible to do. You have two options here, either implement a custom IAnsiConsole, or implement a IAnsiConsoleRecorder and use the record functionality of IAnsiConsole. There should already be a text recorder in Spectre.Console that should do what you need.

Will add an example once I'm at a computer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants