RecordGenerator
RecordGenerator copied to clipboard
C# immutable records generator
There are some Record-like classes in Records. Let's make them Records.
So, I approached this problem already with https://github.com/amis92/RecordGenerator/commit/1172c747b1b1a5fd669b86299eca53ee21f5fc05 (using MS.CA.CSharp.Workspaces package). I'm considering keeping this PR open because I might be able to allow dependencies with CG.R soon, and then...
There could be a private or protected constructor in the record class that would take Builder parameter and directly copy off the builder fields. It'd significatly reduce reference copying for...
This might impact code coverage tests (which currently can't filter out this generated code).
This is a discussion-style issue for the [new records proposal](https://github.com/dotnet/csharplang/blob/856c335cc584eda2178f0604cc845ef200d89f97/proposals/recordsv2.md) being floated and [discussed](https://github.com/dotnet/csharplang/issues/2699), and which may have some ramifications for this project.
Creating a builder from an immutable object results in copying over all of its properties. It could be optimized by creating a private class, derived from Builder, that also holds...