{"id":13629310,"url":"https://github.com/MelGrubb/BuilderGenerator","last_synced_at":"2025-04-17T08:34:36.571Z","repository":{"id":50414766,"uuid":"336839208","full_name":"MelGrubb/BuilderGenerator","owner":"MelGrubb","description":"A source-generator-based implementation of the Builder pattern","archived":false,"fork":false,"pushed_at":"2025-03-10T00:47:53.000Z","size":837,"stargazers_count":42,"open_issues_count":5,"forks_count":9,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-12T03:51:45.619Z","etag":null,"topics":["builders","csharp","csharp-sourcegenerator","dotnet","nuget-package","testing"],"latest_commit_sha":null,"homepage":"https://melgrubb.github.io/BuilderGenerator/","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MelGrubb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-02-07T16:55:11.000Z","updated_at":"2025-04-04T21:42:52.000Z","dependencies_parsed_at":"2024-01-14T05:31:53.158Z","dependency_job_id":"5abbc27e-691f-44a0-80b5-92f96dbb07d6","html_url":"https://github.com/MelGrubb/BuilderGenerator","commit_stats":{"total_commits":97,"total_committers":1,"mean_commits":97.0,"dds":0.0,"last_synced_commit":"92db56c9073ede81e7e25d339ac7c2c6fa2c01a9"},"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MelGrubb%2FBuilderGenerator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MelGrubb%2FBuilderGenerator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MelGrubb%2FBuilderGenerator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MelGrubb%2FBuilderGenerator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MelGrubb","download_url":"https://codeload.github.com/MelGrubb/BuilderGenerator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249326186,"owners_count":21251735,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["builders","csharp","csharp-sourcegenerator","dotnet","nuget-package","testing"],"created_at":"2024-08-01T22:01:07.142Z","updated_at":"2025-04-17T08:34:36.562Z","avatar_url":"https://github.com/MelGrubb.png","language":"C#","readme":"[![Nuget](https://img.shields.io/nuget/dt/buildergenerator)](https://www.nuget.org/packages/BuilderGenerator/)\n[![GitHub](https://img.shields.io/github/license/melgrubb/buildergenerator)](https://opensource.org/licenses/MIT)\n[![GitHub issues](https://img.shields.io/github/issues/melgrubb/buildergenerator)](https://github.com/MelGrubb/BuilderGenerator/issues)\n[![CI](https://github.com/MelGrubb/BuilderGenerator/actions/workflows/ci.yml/badge.svg)](https://github.com/MelGrubb/BuilderGenerator/actions/workflows/ci.yml)\n[![Discord](https://img.shields.io/discord/813785114722697258?logo=discord\u0026logoColor=white)](https://discord.com/channels/813785114722697258/1099524153436012694)\n\n# Builder Generator #\n\nThis is a .Net Source Generator designed to add \"Builders\" to your projects. [Builders](https://en.wikipedia.org/wiki/Builder_pattern) are an object creation pattern, similar to the [Object Mother](https://martinfowler.com/bliki/ObjectMother.html) pattern. Object Mothers and Builders are most commonly used to create objects for testing, but they can be used anywhere you want \"canned\" objects.\n\nFor more complete documentation, please see the [documentation site](https://melgrubb.github.io/BuilderGenerator/) or the raw [documentation source](https://github.com/MelGrubb/BuilderGenerator/blob/main/docs/index.md).\n\n## Installation ##\n\nBuilderGenerator is installed as an analyzer via NuGet package (https://www.nuget.org/packages/BuilderGenerator/). You can find it through the \"Manage NuGet Packages\" dialog in Visual Studio, or from the command line.\n\n```ps\nInstall-Package BuilderGenerator\n```\n\n## Usage ##\n\nAfter installation, create a partial class to define your builder in. Decorate it with the ```BuilderFor``` attribute, specifying the type of class that the builder is meant to build (e.g. ```[BuilderFor(typeof(Foo))]```. Define any factory and helper methods in this partial class. Meanwhile, another partial class definition will be auto-generated which contains all the \"boring\" parts such as the backing fields and \"with\" methods.\n\n## Version History ##\n- v3.1.0\n  - Object backing property (e.g. PersonBuilder.Person) is now public (#60).\n  - PostBuildAction property is now public.\n  - Solved duplicate property problem (#61)\n  - Switched tests to xUnit\n\n- v3.0.5\n  - Properties marked as Obsolete are ignored by the Builders\n  - The \"Object\" property is now named for the Builder's target class\n  - Solved the \"Duplicate Definition\" problem (#41)\n  - PostBuildAction replaces PostProcess method\n\n- v2.4.0\n    - Test code reorganization\n    - Moved WithObject from the base class to the generated builder class\n    - Added WithValuesFrom method to shallow clone an example object.\n\n- v2.3.0\n    - Major caching and performance improvements\n    - Internal code cleanup\n    - Conversion of templates to embedded resources\n\n- v2.2.0\n  - Changed generated file extension to .g.cs\n\n- v2.0.7\n  - Fixed #13, NetStandard2.0 compatibility\n\n- v2.0.6\n  - Fixed #12, Generated files now marked with auth-generated header\n\n- v2.0.5\n  - Fixed #14, duplicate properties\n\n- v2.0.3\n  - Attempting to fix NuGet packaging problems\n\n- v2.0.2\n  - Setters for base class properties rendering properly\n\n- v2.0.1\n  - Improved error handling\n\n- v2.0.0\n  - Updated to .Net 6 and IIncrementalGenerator (See note above about incompatibility with VS2019)\n  - Changed usage pattern from marking target classes with attributes to marking partial builder classes\n\n- v1.2\n  - Solution reorganization\n  - Version number synchronization\n  - Automated build pipeline\n\n- v1.0\n  - First major release\n\n- v0.5\n  - Public beta\n  - Working NuGet package\n  - Customizable templates\n\n## Roadmap ##\n\n- Read-only collection support in default templates\n- Attribute-less generation of partial classes\n- Completed documentation\n- Unit tests for generation components\n\n## Attributions ##\n\nThe BuilderGenerator logo includes [tools](https://thenounproject.com/term/tools/11192) by John Caserta from the Noun Project.\n","funding_links":[],"categories":["Content"],"sub_categories":["66. [BuilderGenerator](https://ignatandrei.github.io/RSCG_Examples/v2/docs/BuilderGenerator) , in the [Builder](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#builder) category"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMelGrubb%2FBuilderGenerator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMelGrubb%2FBuilderGenerator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMelGrubb%2FBuilderGenerator/lists"}