{"id":15409948,"url":"https://github.com/havendv/h.resources.generator","last_synced_at":"2025-04-19T07:30:06.225Z","repository":{"id":62463729,"uuid":"356448706","full_name":"HavenDV/H.Resources.Generator","owner":"HavenDV","description":"Generates a static class with all Embedded resources","archived":false,"fork":false,"pushed_at":"2025-04-08T00:46:08.000Z","size":314,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-12T12:55:55.095Z","etag":null,"topics":["dotnet","generator","net5","netcore","netframework","resourcer","resources"],"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},"funding":{"patreon":"havendv","ko_fi":"havendv","custom":["https://www.paypal.me/havendv","https://www.buymeacoffee.com/havendv","https://www.upwork.com/freelancers/~017b1ad6f6af9cc189"]}},"created_at":"2021-04-10T02:32:26.000Z","updated_at":"2025-04-08T00:46:06.000Z","dependencies_parsed_at":"2023-11-22T05:22:21.899Z","dependency_job_id":"c508b2a6-05ad-42ce-b18f-6888f694f3e5","html_url":"https://github.com/HavenDV/H.Resources.Generator","commit_stats":{"total_commits":114,"total_committers":3,"mean_commits":38.0,"dds":0.4035087719298246,"last_synced_commit":"cf4d7f2e0e45d17d7b3243d6e60a8e2d6d9ce2ec"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":"HavenDV/CSharpProjectTemplate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HavenDV%2FH.Resources.Generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HavenDV%2FH.Resources.Generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HavenDV%2FH.Resources.Generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HavenDV%2FH.Resources.Generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HavenDV","download_url":"https://codeload.github.com/HavenDV/H.Resources.Generator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249191339,"owners_count":21227547,"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":["dotnet","generator","net5","netcore","netframework","resourcer","resources"],"created_at":"2024-10-01T16:42:07.888Z","updated_at":"2025-04-16T03:33:40.175Z","avatar_url":"https://github.com/HavenDV.png","language":"C#","funding_links":["https://patreon.com/havendv","https://ko-fi.com/havendv","https://www.paypal.me/havendv","https://www.buymeacoffee.com/havendv","https://www.upwork.com/freelancers/~017b1ad6f6af9cc189"],"categories":[],"sub_categories":[],"readme":"# [H.Resources.Generator](https://github.com/HavenDV/H.Resources.Generator/) \n\n[![Language](https://img.shields.io/badge/language-C%23-blue.svg?style=flat-square)](https://github.com/HavenDV/H.Resources.Generator/search?l=C%23\u0026o=desc\u0026s=\u0026type=Code) \n[![License](https://img.shields.io/github/license/HavenDV/H.Resources.Generator.svg?label=License\u0026maxAge=86400)](LICENSE.md) \n[![Requirements](https://img.shields.io/badge/Requirements-.NET%20Standard%202.0-blue.svg)](https://github.com/dotnet/standard/blob/master/docs/versions/netstandard2.0.md)\n[![Build Status](https://github.com/HavenDV/H.Resources.Generator/workflows/.NET/badge.svg?branch=master)](https://github.com/HavenDV/H.Resources.Generator/actions?query=workflow%3A%22.NET%22)\n\n### Nuget\n\n[![NuGet](https://img.shields.io/nuget/dt/H.Resources.Generator.svg?style=flat-square\u0026label=H.Resources.Generator)](https://www.nuget.org/packages/H.Resources.Generator/)\n\n```\nInstall-Package H.Resources.Generator\n```\n\n### Usage\nJust install this package and add any resources to Resources subfolder. After you can use resources in the code:\n```cs\nvar bytes = H.Resources.name_png.AsBytes();\n// or\nvar text = H.Resources.name_txt.AsText();\n```\n\n### Advanced Usage\n\n```xml\n\u003cPropertyGroup\u003e\n  \u003cHResourcesGenerator_WithSystemDrawing\u003etrue\u003c/HResourcesGenerator_WithSystemDrawing\u003e\n\u003c/PropertyGroup\u003e\n\n\u003cItemGroup Label=\"Images\"\u003e\n  \u003cEmbeddedResource Include=\"Images\\*.png\" /\u003e\n  \u003cAdditionalFiles Include=\"Images\\*.png\" HResourcesGenerator_Resource=\"true\" /\u003e\n\u003c/ItemGroup\u003e\n```\n\nAfter it, use resource in code:\n```cs\nvar image = H.Resources.image_name_png.AsImage();\n// or\nvar bytes = H.Resources.image_name_png.AsBytes();\n```\n\nAvailable methods:\n- System.Drawing.Image AsImage() (only if `HResourcesGenerator_WithSystemDrawing` is true)\n- System.IO.Stream AsStream()\n- string AsString()\n- byte[] AsBytes()\n\nGlobal options(Default values are provided and can be omitted):\n```xml\n\u003cPropertyGroup\u003e\n  \u003cHResourcesGenerator_Namespace\u003eH\u003c/HResourcesGenerator_Namespace\u003e\n  \u003cHResourcesGenerator_Modifier\u003einternal\u003c/HResourcesGenerator_Modifier\u003e\n  \u003cHResourcesGenerator_ClassName\u003eResources\u003c/HResourcesGenerator_ClassName\u003e\n  \u003cHResourcesGenerator_AddResourcesFolder\u003etrue\u003c/HResourcesGenerator_AddResourcesFolder\u003e\n  \u003cHResourcesGenerator_WithSystemDrawing\u003efalse\u003c/HResourcesGenerator_WithSystemDrawing\u003e\n\u003c/PropertyGroup\u003e\n```\n\nBy default, it includes this code:\n```xml\n\u003cItemGroup Condition=\"$(HResourcesGenerator_AddResourcesFolder)\"\u003e\n  \u003cEmbeddedResource Include=\"Resources\\**\\*.*\" /\u003e\n  \u003cAdditionalFiles Include=\"Resources\\**\\*.*\" HResourcesGenerator_Resource=\"true\" /\u003e\n  \u003cCompile Remove=\"Resources\\**\\*.*\" /\u003e\n\u003c/ItemGroup\u003e\n```\nYou can disable this behavior with `\u003cHResourcesGenerator_AddResourcesFolder\u003efalse\u003c/HResourcesGenerator_AddResourcesFolder\u003e`\n\n### Alternatives\n- [Resourcer.Fody](https://github.com/Fody/Resourcer) \n\n### Contacts\n* [mail](mailto:havendv@gmail.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhavendv%2Fh.resources.generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhavendv%2Fh.resources.generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhavendv%2Fh.resources.generator/lists"}