Default values are not applied
Hi, first of all thank you for this library. It's awesome.
Found out that if I try to set default value to property when there is only getter, then it's not set up.
So here IsCenter will be null
public bool? IsCenter { get; } = true;
But if I make it like this
public bool? IsCenter { get; private set; } = true;
Then it will be true.
But if I add private set; then I don't see that property in Builder.
I believe this is due to this snippet not actually "copying over" the default value assignments to the builder's properties: https://github.com/amis92/RecordGenerator/blob/f1fca2d21453aa6d9d20ff53299bdf11db6bdf36/src/Amadevus.RecordGenerator.Generators/BuilderPartialGenerator.cs#L33-L48
Then once you add private set I think it's not using this for the Record at all as it only accepts read-only properties? I might be wrong on that one.
Hi, yes you're correct - default values aren't copied over to the Builder. Since the record's constructor actually requires passing all of the properties into it, it wouldn't ever be used anyway. It could be indeed if "copied over" into Builder - but it introduced a lot of other headaches (e.g. default value being a class constant/static field would fail to resolve correctly inside Builder).
I won't be developing this project since C#9 provides record types which do exactly everything this project does, but better (and cleaner).
If you'd provide a PR with unit tests, it's possible I'd accept and release it however, because it doesn't seem to be a big change.