nietras / Sep

World's Fastest .NET CSV Parser. Modern, minimal, fast, zero allocation, reading and writing of separated values (`csv`, `tsv` etc.). Cross-platform, trimmable and AOT/NativeAOT compatible.
http://nietras.com
MIT License
840 stars 33 forks source link

Source generation for object property mapping #148

Closed tai-yi closed 2 months ago

tai-yi commented 2 months ago

@nietras , for better user experience , is there any plan to add source generation for object property mapping?

Writing below code is very boring.

new MyDto{
    PropertyA = row["Col A"].ToString()
    ....
}
nietras commented 2 months ago

There are no plans for source generation, boring code is simple and quick to do, source generation is not, it's complex, full of pitfalls and often ends up using attributes or similar which are no different in terms of lines of code than just writing the actual read code.

So no immediate plans for that, many other things would have higher priority. :)