Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Are you open to PRs for this project? #4

Open
BrianMcBrayer opened this issue Mar 28, 2021 · 1 comment
Open

Are you open to PRs for this project? #4

BrianMcBrayer opened this issue Mar 28, 2021 · 1 comment

Comments

@BrianMcBrayer
Copy link

I’m a software developer who was going to write some C# code generators for a fluent dto builder, and I saw your data-builder-generator which is very similar.

Instead of me writing my own to match my particular needs, would you be open to me opening some PRs to extend yours?

  • I’ve found a few small bugs (possible) where VS doesn’t like internal classes decorated with the GenerateDataBuilder attribute
  • I’d like to add an assembly-level attribute that can be used to specify a file to generate the data builder for (so instead of decorating a class, you could put these attributes somewhere else, like a test project, if you only use the builder pattern to test DTOs and don’t want to put the attribute on prod code). Maybe something like the following?
[GenerateDataBuilderFor(nameof(MyAssembly.MyClass), generatedNamespace: $"{nameof(MyAssembly.MyClass)}.Tests")]
  • I’d like to extend the collection-level builder so that one could add single items to ICollection<T>. So... with the following class:
[GenerateDataBuilder]
public class Family
{
    public List<string> FamilyMember { get; set; }
}

The builder would have the following method WithFamilyMember(string familyMember) that would add a single string to the list.

@dasMulli
Copy link
Owner

Yes if you'd like to extend the functionality and fix some issues, I'd be happy to work with you to get these out.

As I previously mentioned in #3, I wanted to hold off a bit waiting for good practices in source generators to emerge before refactoring / working on more features since it does what I need it to do.
But again, if you need any extensions, no need to wait.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants