{"id":13629341,"url":"https://github.com/AlexRussak/Roozie.AutoInterface","last_synced_at":"2025-04-17T08:34:39.360Z","repository":{"id":65333246,"uuid":"574266166","full_name":"AlexRussak/Roozie.AutoInterface","owner":"AlexRussak","description":"C# source generator to automatically create an interface from a class","archived":false,"fork":false,"pushed_at":"2023-10-19T20:52:47.000Z","size":145,"stargazers_count":5,"open_issues_count":5,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-09T05:33:42.463Z","etag":null,"topics":["codegen","codegeneration","codegenerator","csharp","generation","generator","interface","sourcegeneration","sourcegenerator"],"latest_commit_sha":null,"homepage":"https://www.nuget.org/packages/Roozie.AutoInterface","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/AlexRussak.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}},"created_at":"2022-12-04T23:05:37.000Z","updated_at":"2025-03-16T16:18:30.000Z","dependencies_parsed_at":"2024-01-14T09:02:48.948Z","dependency_job_id":null,"html_url":"https://github.com/AlexRussak/Roozie.AutoInterface","commit_stats":{"total_commits":48,"total_committers":2,"mean_commits":24.0,"dds":0.125,"last_synced_commit":"eb4f06dd577e9939ca6a2ef832e08301a2e2ed6d"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexRussak%2FRoozie.AutoInterface","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexRussak%2FRoozie.AutoInterface/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexRussak%2FRoozie.AutoInterface/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexRussak%2FRoozie.AutoInterface/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlexRussak","download_url":"https://codeload.github.com/AlexRussak/Roozie.AutoInterface/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":["codegen","codegeneration","codegenerator","csharp","generation","generator","interface","sourcegeneration","sourcegenerator"],"created_at":"2024-08-01T22:01:07.968Z","updated_at":"2025-04-17T08:34:39.062Z","avatar_url":"https://github.com/AlexRussak.png","language":"C#","funding_links":[],"categories":["Content"],"sub_categories":["56. [Roozie.AutoInterface](https://ignatandrei.github.io/RSCG_Examples/v2/docs/Roozie.AutoInterface) , in the [Interface](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#interface) category"],"readme":"# Roozie.AutoInterface\n\n[![NuGet Version](https://img.shields.io/nuget/vpre/Roozie.AutoInterface)](https://www.nuget.org/packages/Roozie.AutoInterface)\n[![NuGet](https://img.shields.io/nuget/dt/Roozie.AutoInterface.svg)](https://www.nuget.org/packages/Roozie.AutoInterface)\n\n# What is it?\n\nRoozie.AutoInterface is a C# source generator that generates an interface for a class. The generated interface contains\nthe XML-doc comments, public properties, and public methods.\n\n# Why?\n\nInterfaces are great for keeping your code loosely coupled and unit testable. But, they add some maintenance overhead.\nThis source generator will keep your interfaces up to date.\n\n# How to use it?\n\n1. Add the NuGet package to your project.\n\n   `dotnet add package Roozie.AutoInterface --prerelease`\n\n2. Create a class where you want to generate an interface.\n\n```csharp\npublic class MyClass\n{\n    public string MyProperty { get; set; }\n\n    public void MyMethod()\n    {\n        // Do something\n    }\n}\n```\n\n3. Add the `[AutoInterface]` attribute to the class.\n4. An interface will be generated in the same namespace as the class.\n\nYou can now use the generated interface in your code.\nIf the class is `partial`, the interface will be automatically implemented.\n\nCheck out the tests ([1](/Roozie.AutoInterface.Tests), [2](/Roozie.AutoInterface.Tests.Integration)) for examples.\n\n## Configuration\n\nYou can configure the generator in the `[AutoInterface]` attribute. The following options are available:\n\n| Option             | Default Value    | Description                                                                                                                                                      |\n|--------------------|------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Name               | \"I\" + Class name | Set the interface to whatever name you want.                                                                                                                     |\n| IncludeMethods     | `true`           | Set to `false`, the generator will automatically include methods in the interface. You can mark a method as included by adding the `[AddToInterface]` attribute. |\n| IncludeProperties  | `true`           | Same as IncludeMethods                                                                                                                                           |\n| ImplementOnPartial | `true`           | When true, the interface will be automatically implemented if the class is marked as partial.                                                                    |\n\n# Contributing\n\nPlease open an issue if you find a bug or have a feature request. If you'd like to contribute, please open a pull\nrequest.\n\n# Kudos\n\nAndrew Lock's [Source Generator series](https://andrewlock.net/series/creating-a-source-generator/) is an excellent\nresource for learning all aspects of source generators.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAlexRussak%2FRoozie.AutoInterface","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAlexRussak%2FRoozie.AutoInterface","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAlexRussak%2FRoozie.AutoInterface/lists"}