kevin-montrose / Cesil

Modern CSV (De)Serializer
MIT License
65 stars 3 forks source link

First whack at a source generator for serializers #41

Closed kevin-montrose closed 3 years ago

kevin-montrose commented 3 years ago

Introduces a Source Generator for AOT creation of serializers.

The generator creates a type per-serialized type with methods that map to ColumnWriterDelegate instances. A new ITypeDescriber knows how to find these types and methods, and constructs SerializableMembers that will use them.

Visible changes

Internal changes

Commentary

This is a first pass at any sort of Source Generator support in Cesil. I expect it will change substantially before shipping, especially in regards to naming and test coverage.