{"id":23052418,"url":"https://github.com/wk-j/settings-generator","last_synced_at":"2025-04-03T04:19:04.449Z","repository":{"id":94333152,"uuid":"314999468","full_name":"wk-j/settings-generator","owner":"wk-j","description":"APP settings generator for ASP.NET Core","archived":false,"fork":false,"pushed_at":"2021-11-22T08:58:10.000Z","size":28,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-08T18:15:18.580Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wk-j.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2020-11-22T09:16:12.000Z","updated_at":"2022-09-03T06:49:57.000Z","dependencies_parsed_at":"2023-04-18T04:05:23.061Z","dependency_job_id":null,"html_url":"https://github.com/wk-j/settings-generator","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wk-j%2Fsettings-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wk-j%2Fsettings-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wk-j%2Fsettings-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wk-j%2Fsettings-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wk-j","download_url":"https://codeload.github.com/wk-j/settings-generator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246933497,"owners_count":20857073,"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":[],"created_at":"2024-12-16T00:13:22.239Z","updated_at":"2025-04-03T04:19:04.429Z","avatar_url":"https://github.com/wk-j.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Settings Generator for ASP.NET\n\n[![Actions](https://github.com/wk-j/dotnet-settings-generator/workflows/NuGet/badge.svg)](https://github.com/wk-j/dotnet-settings-generator/actions)\n[![NuGet](https://img.shields.io/nuget/v/wk.SettingsGenerator.svg)](https://www.nuget.org/packages/wk.SettingsGenerator)\n\n## Installation\n\n```bash\ndotnet add package wk.SettingsGenerator\n```\n\n## Usage\n\n1. Add configuration into `appsettings.json`\n\n```json\n{\n    \"Alfresco\": {\n        \"Url\": \"http://localhost:8080\",\n        \"User\": \"admin\",\n        \"Password\": \"admin\"\n    },\n    \"Database\": {\n        \"ConnectionString\": \"Host=localhost\"\n    }\n}\n```\n\n2. Generate settings class\n\n```csharp\n[AppSettings(FileName = \"appsettings.json\")]\npublic partial class AppSettings { }\n```\n\n3. Load settings\n\n```csharp\npublic void ConfigureServices(IServiceCollection services) {\n    var settings = Configuration.Get\u003cAppSettings\u003e();\n\n    Console.WriteLine(settings.Alfresco.Url);\n    Console.WriteLine(settings.Database.ConnectionString);\n    ...\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwk-j%2Fsettings-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwk-j%2Fsettings-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwk-j%2Fsettings-generator/lists"}