Closed bchavez closed 5 years ago
Thanks for the report.
Looks like the padding method is the issue since it relies on a console to check the width.
I think wrapping it in a if(Environment.UserInteractive) { //padding code...etc }
should do the trick?
If you have the ability to test that, let me know if it does.
A pull request is always welcome.
Yea, that looks like it!
I was thinking about adding something like TableConfiguration.VirutalWidth
(or ForceWidth
or whatever) which would be set and take precedence over of Console.WindowWidth
when in UserInteractive
is true.
What do you think?
Also, can I change the compilation targets to cross-compile to net471
, netstandard1.3
and netstandard2.0
? Only compiling to netstandard1.6
seems to download the entire Internet and lead to some dependency hell with LINQPad when adding a NuGet reference. I vaguely remember the recommended guidance now is to directly target full framework and netstandard2.0
(if you have a compile target less than netstandard2.0
, in this case 1.6).
I can't remember where I read it, but I can look it up if needed.
Hi there,
I'm trying to use this library in LINQPad to copy/paste a table for some readme docs; but soon as I try to call
.ToString
on the table, I get an IO exception.I'm guessing because the library is running in an execution context without the console subsystem, but it would be nice if it ran in a situation like this without a console.
Here's the query I tried to run in LINQPad:
Bogus.dll
https://github.com/bchavez/BogusReferencing
BetterConsoleTables
.// Define other methods and classes here public class Order{ public int OrderId{get;set;} public string Item{get;set;} public int Quantity{get;set;} }