{"id":25404915,"url":"https://github.com/bepost/begenerate","last_synced_at":"2025-04-12T19:35:40.505Z","repository":{"id":275828680,"uuid":"925791786","full_name":"bepost/BeGenerate","owner":"bepost","description":"Code generation for ease of coding in C#","archived":false,"fork":false,"pushed_at":"2025-03-07T17:32:37.000Z","size":77,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-07T18:28:08.540Z","etag":null,"topics":["codegenerator","dotnet"],"latest_commit_sha":null,"homepage":"","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/bepost.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2025-02-01T18:56:11.000Z","updated_at":"2025-03-07T17:23:48.000Z","dependencies_parsed_at":"2025-02-04T20:24:59.366Z","dependency_job_id":"d2daad3e-f1fc-469f-aa0d-295d29dbdc92","html_url":"https://github.com/bepost/BeGenerate","commit_stats":null,"previous_names":["bepost/begenerate"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bepost%2FBeGenerate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bepost%2FBeGenerate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bepost%2FBeGenerate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bepost%2FBeGenerate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bepost","download_url":"https://codeload.github.com/bepost/BeGenerate/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248622887,"owners_count":21135130,"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":["codegenerator","dotnet"],"created_at":"2025-02-16T04:25:04.130Z","updated_at":"2025-04-12T19:35:40.499Z","avatar_url":"https://github.com/bepost.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BeGenerate\n\n[![GitHub License](https://img.shields.io/github/license/bepost/BeGenerate)](LICENSE)\n[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/bepost/BeGenerate/build.yaml)](https://github.com/bepost/BeGenerate/actions)\n[![NuGet Version](https://img.shields.io/nuget/v/BeGenerate)](https://www.nuget.org/packages/BeGenerate)\n\nThis repo is the home for BeGenerate, a .NET Code Generator that simplifies the process of creating boilerplate code.\nThe current feature set is still limited as we're at a pre-release stage, but we're working hard to add more features\nand\nimprove the existing ones.\n\n## Usage\n\nAdd the BeGenerate package to your project:\n\n```bash\ndotnet add package BeGenerate\n```\n\nThis will add the BeGenerate code generator to your project, and will add the required abstractions to your project.\n\n### AutoInterface\n\nThe AutoInterface feature allows you to automatically generate interfaces for your classes. This is useful when you have\na class that you want to extract an interface from, but you don't want to do it manually.\n\nTo use the AutoInterface feature, you need to add the `AutoInterface` attribute to your class:\n\n```csharp\nusing BeGenerate.AutoInterface;\n\n[AutoInterface]\ninternal sealed class MyService : IMyService\n{\n    public void MyMethod()\n    {\n        // Do something\n    }\n    \n    void IMyService.MyExplicitMethod()\n    {\n        // Do something\n    }\n}\n```\n\nWhen you build your project, the code generator will automatically generate an interface for your class:\n\n```csharp\npublic partial interface IMyService\n{\n    void MyMethod();\n    void MyExplicitMethod();\n}\n```\n\nYou can leave out methods and properties by adding the `ExcludeFromInterface` attribute to them:\n\n```csharp\nusing BeGenerate.AutoInterface;\n\n[AutoInterface]\ninternal sealed class MyService : IMyService\n{\n    public void MyMethod()\n    {\n        // Do something\n    }\n    \n    [ExcludeFromInterface]\n    public void MyMethodToExclude()\n    {\n        // Do something\n    }\n}\n```\n\nIf the generated interface should implement another interface, you can specify it using the `Implements\u003cT\u003e` attribute:\n\n```csharp\n[AutoInterface]\n[Implements\u003cIOtherInterface\u003e]\ninternal sealed class MyService : IMyService\n...\n```\n\nWhen you build your project, the code generator will automatically generate an interface for your class:\n\n```csharp\npublic partial interface IMyService : IOtherInterface \n...\n```\n\nYou can give your interface a custom name by specifying it in the `Name` argument of the `AutoInterface` attribute:\n\n```csharp\n[AutoInterface(Name = \"IMyCustomService\")]\ninternal sealed class MyService : IMyCustomService\n...\n```\n\nIf you don't want your interface to be public, you can also alter the visibility of the generated interface:\n\n```csharp\n[AutoInterface(Accessibility = InterfaceAccessibility.Internal)]\ninternal sealed class MyService : IMyCustomService\n...\n```\n\nOr even remove th access modifier entirely, so you can define it yourself using the partial keyword:\n\n```csharp\n[AutoInterface(Accessibility = InterfaceAccessibility.None)]\ninternal sealed class MyService : IMyCustomService;\n\npublic partial interface IMyCustomService;\n...\n```\n\n## Contributing\n\nBeGenerate is a community project. We invite your participation through issues and pull requests!\n\n## License\n\nAll assets and code are under the MIT LICENSE and in the public domain unless specified otherwise.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbepost%2Fbegenerate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbepost%2Fbegenerate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbepost%2Fbegenerate/lists"}