{"id":20723237,"url":"https://github.com/mgernand/Fluxera.Extensions.Hosting","last_synced_at":"2026-06-04T03:00:48.215Z","repository":{"id":37854443,"uuid":"437450184","full_name":"mgernand/Fluxera.Extensions.Hosting","owner":"mgernand","description":"Generic modular host implementation for several application types","archived":false,"fork":false,"pushed_at":"2026-04-21T07:49:21.000Z","size":1167,"stargazers_count":15,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-04-21T09:40:23.406Z","etag":null,"topics":["asp-net-core","blazor","console","console-application","dotnet","microsoft-extensions","microsoft-extensions-hosting","windows-service","wpf","wpf-application","xamarin"],"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/mgernand.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-12-12T04:14:31.000Z","updated_at":"2026-04-21T07:48:08.000Z","dependencies_parsed_at":"2024-01-04T16:27:20.444Z","dependency_job_id":"9f551a80-3324-479a-b1db-5420587c3ec8","html_url":"https://github.com/mgernand/Fluxera.Extensions.Hosting","commit_stats":null,"previous_names":["fluxera/fluxera.extensions.hosting"],"tags_count":60,"template":false,"template_full_name":null,"purl":"pkg:github/mgernand/Fluxera.Extensions.Hosting","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgernand%2FFluxera.Extensions.Hosting","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgernand%2FFluxera.Extensions.Hosting/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgernand%2FFluxera.Extensions.Hosting/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgernand%2FFluxera.Extensions.Hosting/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mgernand","download_url":"https://codeload.github.com/mgernand/Fluxera.Extensions.Hosting/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgernand%2FFluxera.Extensions.Hosting/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33887124,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-04T02:00:06.755Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["asp-net-core","blazor","console","console-application","dotnet","microsoft-extensions","microsoft-extensions-hosting","windows-service","wpf","wpf-application","xamarin"],"created_at":"2024-11-17T04:08:02.660Z","updated_at":"2026-06-04T03:00:48.209Z","avatar_url":"https://github.com/mgernand.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fluxera.Extensions.Hosting\nA library that extends the Microsoft.Extensions.Hosting library with modular host implementations \nfor various application platforms.\n\nThe library uses the generic host implementation and build a modular structure upon it. It is\npossible to split your application into login modules that can be shared between different types\nof applications.\n\n## Available Hosts\n\nThe modular host is available for the following applicattion types:\n\n- ASP.NET Core\n- Blazor WebAssembly\n- Console / Windows Service\n- WPF\n- MAUI\n\n## Usage\n\nEvery application needs a host and a startup module class. The application is composed of modules\nthat define dependencies on other modules and optional modules that are loaded as plugins.\n\n```C#\npublic class ConsoleApplicationModule : ConfigureServicesModule\n{\n\tpublic override void ConfigureServices(IServiceConfigurationContext context)\n\t{\n\t\tcontext.Services.AddHostedService\u003cConsoleHostedService\u003e();\n\t\tcontext.Services.AddSingleton\u003cIWeatherService, WeatherService\u003e();\n\t\tcontext.Services.AddOptions\u003cWeatherSettings\u003e().Bind(context.Configuration.GetSection(\"Weather\"));\n\t}\n}\n```\n\nThis startup module just configures some services and regiosters them in the service collection.\nThe service confiuration pipelineis split up into three steps: pre-configure-, configure- and \npost-configure-services. Each methos is executed in every module, before moving to the next method.\n\nIf you need to configure the application after the creation of the service provider you can just\nuse the base class ```ConfigureApplicationModule``` which provides a similar three step \npipeline for initializing the application: pre-configure, configure and post-configure. Additionally\nthis base class provides a methos that is executed on every module when the application shuts down.\n\nIn addtition to the two base classes ```ConfigureServicesModule``` and ```ConfigureApplicationModule```\nyou are free to use one of the module interfaces to meet you configuration needs.\n\n- IModule\n  - IConfigureServicesModule\n    - IPreConfigureServices\n    - IConfigureServices\n    - IPostConfigureServices\n  - IConfigureApplicationModule\n    - IPreConfigureApplication\n    - IConfigureApplication\n    - IPostConfigureApplication\n  - IShutdownApplicationModule\n\nYou can even just implement the ```IModule``` interface on your module class, if you don't need any\nconfiguration and application initialization.\n\n```C#\npublic class ConsoleApplicationHost : ConsoleApplicationHost\u003cConsoleApplicationModule\u003e\n{\n}\n```\n\nThe simplest application host class just inherits from one of the available base classes for the\napplication type you are running.\n\nEach base class provides several methods you can overide to configure additional plugin modules, or\na custom logger to use while bootstrapping the host. Please refer to the samples for more information.\n\n```C#\npublic static class Program\n{\n\tpublic static async Task Main(string[] args)\n\t{\n\t\tawait ApplicationHost.RunAsync\u003cConsoleApplicationHost\u003e(args);\n\n\t\tConsole.WriteLine();\n\t\tConsole.WriteLine(\"Press any key to quit...\");\n\t\tConsole.ReadKey(true);\n\t}\n}\n```\n\nAll what's left to do is to run the host using one of the available static entry-points.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgernand%2FFluxera.Extensions.Hosting","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmgernand%2FFluxera.Extensions.Hosting","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgernand%2FFluxera.Extensions.Hosting/lists"}