Hello, I think this library is good candidate for creating complex objects, i.e.
public ClassA
{
public required int Prop1 {get; init;}
...
public required int PropN {get; init;}
}
However using this removes my compile-time safety, i.e. after adding PropN+1 existing builders will just assign default (0 or null) to it, rather than failing at compile time that PropN is not set.
I understand that doing such check at compile time may be not possible, however it would be nice to at least have possibility to do runtime check.
Proposed api:
[BuilderFor(typeof(ClassA), Strict = true)]
public partial class ClassABuilder
{
}
Then calling .Build() throws if WithPopX was called for each property, if no then it fails with exception.
Hello, I think this library is good candidate for creating complex objects, i.e.
However using this removes my compile-time safety, i.e. after adding PropN+1 existing builders will just assign default (0 or null) to it, rather than failing at compile time that PropN is not set.
I understand that doing such check at compile time may be not possible, however it would be nice to at least have possibility to do runtime check.
Proposed api:
Then calling .Build() throws if WithPopX was called for each property, if no then it fails with exception.