{"id":15409935,"url":"https://github.com/havendv/h.generators.extensions","last_synced_at":"2025-04-19T07:13:14.955Z","repository":{"id":37674514,"uuid":"493569059","full_name":"HavenDV/H.Generators.Extensions","owner":"HavenDV","description":"A set of extensions to simplify the code of generators","archived":false,"fork":false,"pushed_at":"2024-09-16T12:23:26.000Z","size":261,"stargazers_count":11,"open_issues_count":3,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-06T09:22:34.764Z","etag":null,"topics":["exceptions","extensions","settings","source-generator"],"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/HavenDV.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-05-18T08:10:32.000Z","updated_at":"2024-09-17T19:52:58.000Z","dependencies_parsed_at":"2023-02-19T10:15:53.009Z","dependency_job_id":"f9e2cd42-acf3-42ce-840a-24667bb17e82","html_url":"https://github.com/HavenDV/H.Generators.Extensions","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HavenDV%2FH.Generators.Extensions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HavenDV%2FH.Generators.Extensions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HavenDV%2FH.Generators.Extensions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HavenDV%2FH.Generators.Extensions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HavenDV","download_url":"https://codeload.github.com/HavenDV/H.Generators.Extensions/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":220080860,"owners_count":16591595,"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":["exceptions","extensions","settings","source-generator"],"created_at":"2024-10-01T16:42:06.051Z","updated_at":"2024-10-17T14:40:27.437Z","avatar_url":"https://github.com/HavenDV.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# H.Generators.Extensions\nA set of extensions to simplify the code of generators.\nIn addition to extensions, this library also adds a .props file to automatically add your generation-time dependencies \nto the NuGet package and Integration tests.\n\n## Install\nThe usage is pretty simple:\n```xml\n\u003cPackageReference Include=\"H.Generators.Extensions\" Version=\"1.4.2\" PrivateAssets=\"all\" /\u003e\n```\nI want to note that PrivateAssets=\"all\" is required to rule out some issues.\n\n## Extensions\n### AnalyzerConfigOptionsProviderExtensions \n- `options.GetGlobalOption(string name)`\n- `options.GetOption(AdditionalText, string name)`\n- `options.GetRequiredGlobalOption(string name)`\n- `options.GetRequiredOption(AdditionalText, string name)`\n- `options.TryRecognizeFramework()`\n- `options.RecognizeFramework()`\nTo recognize the framework, you will need to add the following code to your %PackageId%.props:\n```xml\n\u003cProject\u003e\n\n  \u003cItemGroup\u003e\n    \u003cCompilerVisibleProperty Include=\"RecognizeFramework_DefineConstants\"/\u003e\n    \u003cCompilerVisibleProperty Include=\"UseWPF\"/\u003e\n    \u003cCompilerVisibleProperty Include=\"UseWinUI\"/\u003e\n    \u003cCompilerVisibleProperty Include=\"UseMaui\"/\u003e\n  \u003c/ItemGroup\u003e\n\n  \u003cTarget Name=\"CreateDefineConstants\" BeforeTargets=\"GenerateMSBuildEditorConfigFileShouldRun;GenerateMSBuildEditorConfigFileCore\"\u003e\n\n    \u003cPropertyGroup\u003e\n      \u003cRecognizeFramework_DefineConstants\u003e$(DefineConstants.Replace(';',','))\u003c/RecognizeFramework_DefineConstants\u003e\n    \u003c/PropertyGroup\u003e\n\n  \u003c/Target\u003e\n  \n\u003c/Project\u003e\n```\n\n### SourceProductionContextExtensions \n- `context.ReportException(string id, Exception)`\n\n### StringExtensions \n- `name.ToPropertyName()`\n- `name.ToParameterName()`\n- `text.RemoveBlankLinesWhereOnlyWhitespaces()`\n- `text.NormalizeLineEndings(string? newLine = null)`\n- `fullTypeName.ExtractNamespace()`\n- `fullTypeName.ExtractSimpleName()`\n- `fullTypeName.WithGlobalPrefix()`\n\n### EnumerableExtensions \n- `values.Inject()`\n\n# H.Generators.Tests.Extensions\n- `DictionaryAnalyzerConfigOptions`\n- `DictionaryAnalyzerConfigOptionsProvider`\n- `MemoryAdditionalText`\n- `ImmutableArrayExtensions.NormalizeLocations`\n\n## Support\nYou can get answers to your questions in my discord support channel:  \nhttps://discord.gg/g8u2t9dKgE","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhavendv%2Fh.generators.extensions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhavendv%2Fh.generators.extensions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhavendv%2Fh.generators.extensions/lists"}