BuilderGenerator icon indicating copy to clipboard operation
BuilderGenerator copied to clipboard

A source-generator-based implementation of the Builder pattern

Results 13 BuilderGenerator issues
Sort by recently updated
recently updated
newest added

Obsolete properties are being picked up, and backing properties and With methods are being generated for obsolete class members. If a project has WarningsAsErrors on, this will prevent compilation. Either...

enhancement

This is a convenience shortcut to turn ``` WithFoo(() => fooBuilder.Build()) ``` into ``` WithFoo(fooBuilder) ``` The builder would have to do some reflection to see whether there even IS...

First of all, **BIG** thanks for the great library, having java background and getting used to [Lombok](https://projectlombok.org/), this functionality was really missing. Should be part of `C#` compiler ;-) Suggestion...

enhancement

Make use of an assembly-level attribute to override higher-level items like the base class template, or to override templates on a global basis. Consider allowing attribute parameters to override individual...

enhancement
backlog

When importing builders generated with `BuilderGenerator` into another project, the following warnings are produced: ```text /home/user/repos/example/Tests/BuilderGenerator/BuilderGenerator.BuilderGenerator/BuilderBaseClass.cs(26,16): warning CS0436: The type 'Builder' in 'BuilderGenerator/BuilderGenerator.BuilderGenerator/BuilderBaseClass.cs' conflicts with the imported type 'Builder' in...

Fill out the project documentation with better examples. Reevaluate existing documentation site and look for gaps.

documentation

Protobuf generated entities seem to work well with `BuilderGenerator` but collections don't get generated. Protobuf collections are of type `RepeatedField` which are read-only properties that implement `IEnumerable`.

enhancement

For plural properties, it would be great to have `Adders` in addition to `Withers` : Builder for `Person`: ````c# class Person{ public IEnumrable Addresses {get;set;} } ```` will generate :...

enhancement

Retain the values from objects passed in to WithObject and use them in the Build method to avoid overwriting them all.

enhancement

I've got a .NET 8/C# 12 project with nullable references enabled and when I use BuilderGenerator on a class that has properties with nullable reference types, the generated builder becomes...