Indiko.Hosting.Abstractions
2.1.1
dotnet add package Indiko.Hosting.Abstractions --version 2.1.1
NuGet\Install-Package Indiko.Hosting.Abstractions -Version 2.1.1
<PackageReference Include="Indiko.Hosting.Abstractions" Version="2.1.1" />
<PackageVersion Include="Indiko.Hosting.Abstractions" Version="2.1.1" />
<PackageReference Include="Indiko.Hosting.Abstractions" />
paket add Indiko.Hosting.Abstractions --version 2.1.1
#r "nuget: Indiko.Hosting.Abstractions, 2.1.1"
#:package Indiko.Hosting.Abstractions@2.1.1
#addin nuget:?package=Indiko.Hosting.Abstractions&version=2.1.1
#tool nuget:?package=Indiko.Hosting.Abstractions&version=2.1.1
Indiko.Hosting.Abstractions
Core hosting abstractions providing a foundation for building .NET applications with standardized bootstrapping and startup patterns.
Overview
This package provides base classes, interfaces, and utilities for application hosting, configuration, logging setup, and lifecycle management. It integrates with the Indiko Blocks system for modular application composition.
Features
- Base Host Bootstrapper: Abstract base class for host initialization with logging and configuration
- Startup Abstractions: Interfaces for defining application startup configuration (
IHostingStartup) - Configuration Utilities: Helper methods for configuration initialization
- Logging Utilities: Standardized logger creation and setup
- Block Integration: Seamless integration with Indiko Blocks management system
- Request Metadata: Interface for accessing HTTP request metadata
- Host Builder Extensions: Extensions for configuring host builders
Installation
dotnet add package Indiko.Hosting.Abstractions
Key Components
BaseHostBootstraper<T, TBaseStartup>
Base class for bootstrapping a host with automatic configuration and logging setup.
public class MyHostBootstrapper : BaseHostBootstraper<MyHostBootstrapper, IMyStartup>
{
protected override IHostBuilder CreateHostBuilder<TStartup>(string[] args)
{
var builder = base.CreateHostBuilder<TStartup>(args);
// Add custom configuration
return builder;
}
}
IHostingStartup
Interface marker for startup classes.
public interface IHostingStartup
{
void ConfigureServices(IServiceCollection services);
void Configure(IApplicationBuilder app, IServiceProvider services, IHostEnvironment environment);
}
Configuration and Logging Utilities
// Create configuration
var configuration = ConfigurationUtil.CreateConfiguration();
// Create logger
var logger = LogUtil.CreateLogger<MyClass>(configuration);
Usage Example
Creating a Custom Host
using Indiko.Hosting.Abstractions;
using Indiko.Hosting.Abstractions.Interfaces;
// Define your startup
public class MyStartup : IHostingStartup
{
public void ConfigureServices(IServiceCollection services)
{
services.AddLogging();
services.AddHttpClient();
// Configure services
}
public void Configure(IApplicationBuilder app, IServiceProvider services, IHostEnvironment env)
{
// Configure middleware
}
}
// Create bootstrapper
public class MyBootstrapper : BaseHostBootstraper<MyBootstrapper, IHostingStartup>
{
// Optionally override methods for custom behavior
}
// Run application
class Program
{
static async Task<int> Main(string[] args)
{
return await MyBootstrapper.Instance.RunAsync<MyStartup>(args);
}
}
Integration with Blocks
The bootstrapper automatically integrates with the Indiko Blocks system:
// Blocks are automatically configured during host building
// 1. ConfigureBuilder is called for all registered blocks
// 2. ConfigureServices is called during service configuration
// 3. Configure is called during application configuration
// 4. PreRunAsync is called before the host runs
Architecture
Lifecycle
- Configuration Initialization: Load configuration from appsettings.json and environment
- Logger Creation: Create logger based on configuration
- Host Builder Creation: Create and configure IHostBuilder
- Block Configuration: Apply all registered blocks to the builder
- Host Building: Build the IHost instance
- Pre-Run Blocks: Execute pre-run logic for all blocks
- Host Run: Start the application
Block Integration Points
ConfigureBuilder(IHostBuilder): Configure the host builderConfigureServices(IServiceCollection): Register servicesConfigure(IApplicationBuilder, IServiceProvider, IHostEnvironment): Configure middlewarePreRunAsync(IServiceProvider): Execute logic before host runs
Target Framework
- .NET 10
Dependencies
Indiko.Common.Runtime.AbstractionsIndiko.Blocks.Common.AbstractionsIndiko.Blocks.Common.ManagementMicrosoft.Extensions.HostingMicrosoft.Extensions.Logging
License
See LICENSE file in the repository root.
Related Packages
Indiko.Hosting.Web- Web API hosting implementationIndiko.Hosting.Mvc- MVC hosting implementationIndiko.Hosting.BlazorServer- Blazor Server hosting implementationIndiko.Hosting.Gateway- API Gateway hosting implementationIndiko.Blocks.Common.Management- Block management system
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Indiko.Blocks.Common.Management (>= 2.1.1)
- Indiko.Blocks.Configuration.Abstractions (>= 2.1.1)
- Indiko.Blocks.Logging.Abstractions (>= 2.1.1)
- Indiko.Common.Runtime.Abstractions (>= 2.1.1)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.0)
- Microsoft.Extensions.DependencyModel (>= 10.0.0)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on Indiko.Hosting.Abstractions:
| Package | Downloads |
|---|---|
|
Indiko.Hosting.BlazorServer
Building Blocks Hosting Blazor Server |
|
|
Indiko.Hosting.Web
Building Blocks Hosting Web |
|
|
Indiko.Hosting.Gateway
Building Blocks Hosting Gateway |
|
|
Indiko.Hosting.Mvc
Building Blocks Hosting MVC |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.1.1 | 31 | 12/2/2025 |
| 2.1.0 | 30 | 12/2/2025 |
| 2.0.0 | 270 | 9/17/2025 |
| 1.7.23 | 373 | 9/8/2025 |
| 1.7.22 | 214 | 9/8/2025 |
| 1.7.21 | 219 | 8/14/2025 |
| 1.7.20 | 274 | 6/23/2025 |
| 1.7.19 | 206 | 6/3/2025 |
| 1.7.18 | 218 | 5/29/2025 |
| 1.7.17 | 224 | 5/26/2025 |
| 1.7.15 | 178 | 4/12/2025 |
| 1.7.14 | 191 | 4/11/2025 |
| 1.7.13 | 172 | 3/29/2025 |
| 1.7.12 | 189 | 3/28/2025 |
| 1.7.11 | 184 | 3/28/2025 |
| 1.7.10 | 177 | 3/28/2025 |
| 1.7.9 | 185 | 3/28/2025 |
| 1.7.8 | 183 | 3/28/2025 |
| 1.7.5 | 220 | 3/17/2025 |
| 1.7.4 | 197 | 3/16/2025 |
| 1.7.3 | 203 | 3/16/2025 |
| 1.7.2 | 203 | 3/16/2025 |
| 1.7.1 | 236 | 3/11/2025 |
| 1.6.8 | 222 | 3/11/2025 |
| 1.6.7 | 278 | 3/4/2025 |
| 1.6.6 | 172 | 2/26/2025 |
| 1.6.5 | 188 | 2/20/2025 |
| 1.6.4 | 167 | 2/20/2025 |
| 1.6.3 | 185 | 2/5/2025 |
| 1.6.2 | 169 | 1/24/2025 |
| 1.6.1 | 177 | 1/24/2025 |
| 1.6.0 | 163 | 1/16/2025 |
| 1.5.2 | 170 | 1/16/2025 |
| 1.5.1 | 218 | 11/3/2024 |
| 1.5.0 | 195 | 10/26/2024 |
| 1.3.2 | 190 | 10/24/2024 |
| 1.3.0 | 210 | 10/10/2024 |
| 1.2.5 | 204 | 10/9/2024 |
| 1.2.4 | 208 | 10/8/2024 |
| 1.2.1 | 197 | 10/3/2024 |
| 1.2.0 | 201 | 9/29/2024 |
| 1.1.1 | 184 | 9/23/2024 |
| 1.1.0 | 223 | 9/18/2024 |
| 1.0.33 | 226 | 9/15/2024 |
| 1.0.28 | 200 | 8/28/2024 |
| 1.0.27 | 208 | 8/24/2024 |
| 1.0.26 | 209 | 7/7/2024 |
| 1.0.25 | 205 | 7/6/2024 |
| 1.0.24 | 211 | 6/25/2024 |
| 1.0.23 | 199 | 6/1/2024 |
| 1.0.22 | 213 | 5/14/2024 |
| 1.0.21 | 186 | 5/14/2024 |
| 1.0.20 | 223 | 4/8/2024 |
| 1.0.19 | 214 | 4/3/2024 |
| 1.0.18 | 209 | 3/23/2024 |
| 1.0.17 | 224 | 3/19/2024 |
| 1.0.16 | 202 | 3/19/2024 |
| 1.0.15 | 210 | 3/11/2024 |
| 1.0.14 | 227 | 3/10/2024 |
| 1.0.13 | 216 | 3/6/2024 |
| 1.0.12 | 237 | 3/1/2024 |
| 1.0.11 | 224 | 3/1/2024 |
| 1.0.10 | 215 | 3/1/2024 |
| 1.0.9 | 237 | 3/1/2024 |
| 1.0.8 | 231 | 2/19/2024 |
| 1.0.7 | 231 | 2/17/2024 |
| 1.0.6 | 225 | 2/17/2024 |
| 1.0.5 | 223 | 2/17/2024 |
| 1.0.4 | 218 | 2/7/2024 |
| 1.0.3 | 191 | 2/6/2024 |
| 1.0.1 | 206 | 2/6/2024 |
| 1.0.0 | 277 | 1/9/2024 |
| 1.0.0-preview99 | 231 | 12/22/2023 |
| 1.0.0-preview98 | 206 | 12/21/2023 |
| 1.0.0-preview97 | 193 | 12/21/2023 |
| 1.0.0-preview96 | 184 | 12/20/2023 |
| 1.0.0-preview95 | 155 | 12/20/2023 |
| 1.0.0-preview94 | 191 | 12/18/2023 |
| 1.0.0-preview93 | 364 | 12/13/2023 |
| 1.0.0-preview92 | 194 | 12/13/2023 |
| 1.0.0-preview91 | 251 | 12/12/2023 |
| 1.0.0-preview90 | 186 | 12/11/2023 |
| 1.0.0-preview89 | 188 | 12/11/2023 |
| 1.0.0-preview88 | 329 | 12/6/2023 |
| 1.0.0-preview87 | 213 | 12/6/2023 |
| 1.0.0-preview86 | 215 | 12/6/2023 |
| 1.0.0-preview85 | 192 | 12/6/2023 |
| 1.0.0-preview84 | 215 | 12/5/2023 |
| 1.0.0-preview83 | 228 | 12/5/2023 |
| 1.0.0-preview82 | 214 | 12/5/2023 |
| 1.0.0-preview81 | 204 | 12/4/2023 |
| 1.0.0-preview80 | 192 | 12/1/2023 |
| 1.0.0-preview77 | 198 | 12/1/2023 |
| 1.0.0-preview76 | 207 | 12/1/2023 |
| 1.0.0-preview75 | 185 | 12/1/2023 |
| 1.0.0-preview74 | 208 | 11/26/2023 |
| 1.0.0-preview73 | 242 | 11/7/2023 |
| 1.0.0-preview72 | 196 | 11/6/2023 |
| 1.0.0-preview71 | 226 | 11/3/2023 |
| 1.0.0-preview70 | 221 | 11/2/2023 |
| 1.0.0-preview69 | 218 | 11/2/2023 |
| 1.0.0-preview68 | 220 | 11/2/2023 |
| 1.0.0-preview67 | 206 | 11/2/2023 |
| 1.0.0-preview66 | 188 | 11/2/2023 |
| 1.0.0-preview65 | 212 | 11/2/2023 |
| 1.0.0-preview64 | 202 | 11/2/2023 |
| 1.0.0-preview63 | 194 | 11/2/2023 |
| 1.0.0-preview62 | 210 | 11/1/2023 |
| 1.0.0-preview61 | 215 | 11/1/2023 |
| 1.0.0-preview60 | 218 | 11/1/2023 |
| 1.0.0-preview59 | 204 | 11/1/2023 |
| 1.0.0-preview58 | 191 | 10/31/2023 |
| 1.0.0-preview57 | 212 | 10/31/2023 |
| 1.0.0-preview56 | 198 | 10/31/2023 |
| 1.0.0-preview55 | 190 | 10/31/2023 |
| 1.0.0-preview54 | 203 | 10/31/2023 |
| 1.0.0-preview53 | 204 | 10/31/2023 |
| 1.0.0-preview52 | 190 | 10/31/2023 |
| 1.0.0-preview51 | 214 | 10/31/2023 |
| 1.0.0-preview50 | 206 | 10/31/2023 |
| 1.0.0-preview48 | 205 | 10/31/2023 |
| 1.0.0-preview46 | 199 | 10/31/2023 |
| 1.0.0-preview45 | 206 | 10/31/2023 |
| 1.0.0-preview44 | 216 | 10/31/2023 |
| 1.0.0-preview43 | 195 | 10/31/2023 |
| 1.0.0-preview42 | 213 | 10/30/2023 |
| 1.0.0-preview41 | 213 | 10/30/2023 |
| 1.0.0-preview40 | 226 | 10/27/2023 |
| 1.0.0-preview39 | 227 | 10/27/2023 |
| 1.0.0-preview38 | 222 | 10/27/2023 |
| 1.0.0-preview37 | 199 | 10/27/2023 |
| 1.0.0-preview36 | 208 | 10/27/2023 |
| 1.0.0-preview35 | 211 | 10/27/2023 |
| 1.0.0-preview34 | 215 | 10/27/2023 |
| 1.0.0-preview33 | 211 | 10/26/2023 |
| 1.0.0-preview32 | 210 | 10/26/2023 |
| 1.0.0-preview31 | 229 | 10/26/2023 |
| 1.0.0-preview30 | 219 | 10/26/2023 |
| 1.0.0-preview29 | 227 | 10/26/2023 |
| 1.0.0-preview28 | 203 | 10/26/2023 |
| 1.0.0-preview27 | 230 | 10/26/2023 |
| 1.0.0-preview26 | 224 | 10/25/2023 |
| 1.0.0-preview25 | 219 | 10/23/2023 |
| 1.0.0-preview24 | 229 | 10/23/2023 |
| 1.0.0-preview23 | 217 | 10/23/2023 |
| 1.0.0-preview22 | 205 | 10/23/2023 |
| 1.0.0-preview21 | 212 | 10/23/2023 |
| 1.0.0-preview20 | 234 | 10/20/2023 |
| 1.0.0-preview19 | 217 | 10/19/2023 |
| 1.0.0-preview18 | 243 | 10/18/2023 |
| 1.0.0-preview16 | 253 | 10/11/2023 |
| 1.0.0-preview14 | 186 | 10/10/2023 |
| 1.0.0-preview13 | 182 | 10/10/2023 |
| 1.0.0-preview12 | 178 | 10/9/2023 |
| 1.0.0-preview11 | 188 | 10/9/2023 |
| 1.0.0-preview101 | 197 | 1/5/2024 |