{"id":15783409,"url":"https://github.com/msx752/packzero.configuration","last_synced_at":"2025-03-31T16:49:35.337Z","repository":{"id":87158026,"uuid":"606880101","full_name":"msx752/PackZero.Configuration","owner":"msx752","description":"extension for the IConfiguration, appsettings.json mapping easily used class object rely on EnvironmentName","archived":false,"fork":false,"pushed_at":"2023-03-04T23:53:06.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-19T13:11:18.658Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/msx752.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":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-26T20:33:59.000Z","updated_at":"2023-02-26T20:48:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"272371d4-a3f7-4121-bbc7-5ee72c49e6e4","html_url":"https://github.com/msx752/PackZero.Configuration","commit_stats":{"total_commits":11,"total_committers":1,"mean_commits":11.0,"dds":0.0,"last_synced_commit":"edc5404bfa8d42f4ce3e13f6abe10e7bbc819ba0"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msx752%2FPackZero.Configuration","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msx752%2FPackZero.Configuration/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msx752%2FPackZero.Configuration/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msx752%2FPackZero.Configuration/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/msx752","download_url":"https://codeload.github.com/msx752/PackZero.Configuration/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246500354,"owners_count":20787678,"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-10-04T19:41:38.340Z","updated_at":"2025-03-31T16:49:35.308Z","avatar_url":"https://github.com/msx752.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Nuget](https://img.shields.io/badge/package-PackZero.Configuration-brightgreen.svg?maxAge=259200)](https://www.nuget.org/packages/PackZero.Configuration)\n[![CodeQL](https://github.com/msx752/PackZero.Configuration/actions/workflows/codeql.yml/badge.svg?branch=main)](https://github.com/msx752/PackZero.Configuration/actions/workflows/codeql.yml)\n[![MIT](https://img.shields.io/badge/License-MIT-blue.svg?maxAge=259200)](https://github.com/msx752/PackZero.Configuration/blob/main/LICENSE.md)\n\n\n# PackZero.Configuration\nextension for the IConfiguration, appsettings.json mapping easily used class object rely on EnvironmentName (especially for the ConsoleApp)\n\n# How to Use\n``` c#\nusing PackZero.Configuration;\n```\nExample Configuration cs file\n``` c#\npublic class GeneralConfig\n{\n    public GeneralConfig()\n    {\n        DeveloperIds = new List\u003culong\u003e();\n    }\n\n    public string DiscordAppToken { get; set; }\n    public List\u003culong\u003e DeveloperIds { get; set; }\n    public ulong DeveloperServerId { get; set; }\n}\n```\ndisplaying appsettings.json scope \n``` json\n{\n\t\"GeneralConfig\": {\n\t    \"DiscordAppId\": 543218350067605504,\n\t    \"DiscordAppToken\": \"tokenValue\",\n\t    \"DeveloperIds\": [ 321249607107395585 ],\n\t    \"DeveloperServerId\": 543218350067605504\n  \t}\n}\n\n```\nService Collection defition\n\n``` c#\nservices.AddAppZeroConfiguration(typeof(GeneralConfig));\n```\n\n# Features\n- ConsoleApp Environment Configuration rely on appsettings.{environmentName}.json\nusage\n``` c#\n\t\tvar host = Host.CreateDefaultBuilder(args);\n\n\t\thost.UseAppZeroConfiguration();\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsx752%2Fpackzero.configuration","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmsx752%2Fpackzero.configuration","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsx752%2Fpackzero.configuration/lists"}