minhhungit / ConsoleTableExt

A fluent library to print out a nicely formatted table in a console application C#
MIT License
323 stars 36 forks source link

Adding support for generic lists. #3

Closed StingyJack closed 5 years ago

StingyJack commented 5 years ago

As referenced in #2

minhhungit commented 5 years ago

@StingyJack Thank you for your contribution.

I think we will need to add limits for List<T> for example: List<T> where T : class, what do you think? Currently it will throw exception if user use List<int> or something like that

We might also need to validate columnNames

And, can you create some test cases please!

Thank you!

StingyJack commented 5 years ago

T:class makes sense unless you want to pass a list of ints to have them table formatted, or you dont know the type of T before. I added support for List of value or reference types.

I dont know what you mean by validate column names, they are coming from the object's properties or if a value type they will be { "Value" }.

Unless I missed it, there aren't any tests in the solution except the console application. Where do you mean test cases?

minhhungit commented 5 years ago

Where do you mean test cases?

Yes, right now we have no test cases, so I mean can you create it (a Test project) Anyway, it's okay for now, I will do it later.

Thank you again!