LiteDB
LiteDB copied to clipboard
Update Source Generator to be incremental
This PR updates the SG to use incremental and improve it:
- With the incremental behavior the generated interfaces will be created/updated just when makes sense for them;
- Just add
unsafe
when the class has unsafe code; - Use Roslyn to determine the members, so no need to use strings or store an array of C# keywords;
There's more that can be done to improve the perf even more, but since it's use internally and just create interfaces I believe this is a good start point and better than the previous implementation