Skip to content

Are you open to PRs for this project? #4

@BrianMcBrayer

Description

@BrianMcBrayer

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions