Indiko.Hosting.Abstractions 2.1.2

dotnet add package Indiko.Hosting.Abstractions --version 2.1.2
                    
NuGet\Install-Package Indiko.Hosting.Abstractions -Version 2.1.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Indiko.Hosting.Abstractions" Version="2.1.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Indiko.Hosting.Abstractions" Version="2.1.2" />
                    
Directory.Packages.props
<PackageReference Include="Indiko.Hosting.Abstractions" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Indiko.Hosting.Abstractions --version 2.1.2
                    
#r "nuget: Indiko.Hosting.Abstractions, 2.1.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Indiko.Hosting.Abstractions@2.1.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Indiko.Hosting.Abstractions&version=2.1.2
                    
Install as a Cake Addin
#tool nuget:?package=Indiko.Hosting.Abstractions&version=2.1.2
                    
Install as a Cake Tool

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

  1. Configuration Initialization: Load configuration from appsettings.json and environment
  2. Logger Creation: Create logger based on configuration
  3. Host Builder Creation: Create and configure IHostBuilder
  4. Block Configuration: Apply all registered blocks to the builder
  5. Host Building: Build the IHost instance
  6. Pre-Run Blocks: Execute pre-run logic for all blocks
  7. Host Run: Start the application

Block Integration Points

  • ConfigureBuilder(IHostBuilder): Configure the host builder
  • ConfigureServices(IServiceCollection): Register services
  • Configure(IApplicationBuilder, IServiceProvider, IHostEnvironment): Configure middleware
  • PreRunAsync(IServiceProvider): Execute logic before host runs

Target Framework

  • .NET 10

Dependencies

  • Indiko.Common.Runtime.Abstractions
  • Indiko.Blocks.Common.Abstractions
  • Indiko.Blocks.Common.Management
  • Microsoft.Extensions.Hosting
  • Microsoft.Extensions.Logging

License

See LICENSE file in the repository root.

  • Indiko.Hosting.Web - Web API hosting implementation
  • Indiko.Hosting.Mvc - MVC hosting implementation
  • Indiko.Hosting.BlazorServer - Blazor Server hosting implementation
  • Indiko.Hosting.Gateway - API Gateway hosting implementation
  • Indiko.Blocks.Common.Management - Block management system
Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.2 347 12/18/2025
2.1.1 727 12/2/2025
2.1.0 705 12/2/2025
2.0.0 285 9/17/2025
1.7.23 392 9/8/2025
1.7.22 236 9/8/2025
1.7.21 241 8/14/2025
1.7.20 291 6/23/2025
1.7.19 225 6/3/2025
1.7.18 242 5/29/2025
1.7.17 239 5/26/2025
1.7.15 193 4/12/2025
1.7.14 206 4/11/2025
1.7.13 187 3/29/2025
1.7.12 202 3/28/2025
1.7.11 205 3/28/2025
1.7.10 203 3/28/2025
1.7.9 208 3/28/2025
1.7.8 200 3/28/2025
1.7.5 242 3/17/2025
1.7.4 216 3/16/2025
1.7.3 216 3/16/2025
1.7.2 220 3/16/2025
1.7.1 255 3/11/2025
1.6.8 242 3/11/2025
1.6.7 293 3/4/2025
1.6.6 196 2/26/2025
1.6.5 214 2/20/2025
1.6.4 195 2/20/2025
1.6.3 198 2/5/2025
1.6.2 191 1/24/2025
1.6.1 195 1/24/2025
1.6.0 178 1/16/2025
1.5.2 187 1/16/2025
1.5.1 233 11/3/2024
1.5.0 216 10/26/2024
1.3.2 210 10/24/2024
1.3.0 230 10/10/2024
1.2.5 220 10/9/2024
1.2.4 230 10/8/2024
1.2.1 212 10/3/2024
1.2.0 217 9/29/2024
1.1.1 210 9/23/2024
1.1.0 241 9/18/2024
1.0.33 244 9/15/2024
1.0.28 214 8/28/2024
1.0.27 227 8/24/2024
1.0.26 234 7/7/2024
1.0.25 227 7/6/2024
1.0.24 225 6/25/2024
1.0.23 218 6/1/2024
1.0.22 229 5/14/2024
1.0.21 205 5/14/2024
1.0.20 249 4/8/2024
1.0.19 236 4/3/2024
1.0.18 219 3/23/2024
1.0.17 238 3/19/2024
1.0.16 225 3/19/2024
1.0.15 223 3/11/2024
1.0.14 251 3/10/2024
1.0.13 234 3/6/2024
1.0.12 257 3/1/2024
1.0.11 236 3/1/2024
1.0.10 230 3/1/2024
1.0.9 253 3/1/2024
1.0.8 246 2/19/2024
1.0.7 245 2/17/2024
1.0.6 244 2/17/2024
1.0.5 245 2/17/2024
1.0.4 237 2/7/2024
1.0.3 213 2/6/2024
1.0.1 217 2/6/2024
1.0.0 300 1/9/2024
1.0.0-preview99 249 12/22/2023
1.0.0-preview98 220 12/21/2023
1.0.0-preview97 209 12/21/2023
1.0.0-preview96 196 12/20/2023
1.0.0-preview95 170 12/20/2023
1.0.0-preview94 212 12/18/2023
1.0.0-preview93 383 12/13/2023
1.0.0-preview92 209 12/13/2023
1.0.0-preview91 267 12/12/2023
1.0.0-preview90 209 12/11/2023
1.0.0-preview89 207 12/11/2023
1.0.0-preview88 342 12/6/2023
1.0.0-preview87 229 12/6/2023
1.0.0-preview86 236 12/6/2023
1.0.0-preview85 205 12/6/2023
1.0.0-preview84 226 12/5/2023
1.0.0-preview83 244 12/5/2023
1.0.0-preview82 230 12/5/2023
1.0.0-preview81 221 12/4/2023
1.0.0-preview80 207 12/1/2023
1.0.0-preview77 218 12/1/2023
1.0.0-preview76 224 12/1/2023
1.0.0-preview75 197 12/1/2023
1.0.0-preview74 225 11/26/2023
1.0.0-preview73 256 11/7/2023
1.0.0-preview72 212 11/6/2023
1.0.0-preview71 246 11/3/2023
1.0.0-preview70 234 11/2/2023
1.0.0-preview69 235 11/2/2023
1.0.0-preview68 247 11/2/2023
1.0.0-preview67 222 11/2/2023
1.0.0-preview66 202 11/2/2023
1.0.0-preview65 227 11/2/2023
1.0.0-preview64 217 11/2/2023
1.0.0-preview63 208 11/2/2023
1.0.0-preview62 230 11/1/2023
1.0.0-preview61 231 11/1/2023
1.0.0-preview60 235 11/1/2023
1.0.0-preview59 219 11/1/2023
1.0.0-preview58 205 10/31/2023
1.0.0-preview57 225 10/31/2023
1.0.0-preview56 211 10/31/2023
1.0.0-preview55 204 10/31/2023
1.0.0-preview54 213 10/31/2023
1.0.0-preview53 213 10/31/2023
1.0.0-preview52 204 10/31/2023
1.0.0-preview51 229 10/31/2023
1.0.0-preview50 218 10/31/2023
1.0.0-preview48 219 10/31/2023
1.0.0-preview46 218 10/31/2023
1.0.0-preview45 228 10/31/2023
1.0.0-preview44 231 10/31/2023
1.0.0-preview43 212 10/31/2023
1.0.0-preview42 229 10/30/2023
1.0.0-preview41 224 10/30/2023
1.0.0-preview40 241 10/27/2023
1.0.0-preview39 245 10/27/2023
1.0.0-preview38 241 10/27/2023
1.0.0-preview37 214 10/27/2023
1.0.0-preview36 229 10/27/2023
1.0.0-preview35 233 10/27/2023
1.0.0-preview34 229 10/27/2023
1.0.0-preview33 230 10/26/2023
1.0.0-preview32 226 10/26/2023
1.0.0-preview31 248 10/26/2023
1.0.0-preview30 233 10/26/2023
1.0.0-preview29 246 10/26/2023
1.0.0-preview28 218 10/26/2023
1.0.0-preview27 249 10/26/2023
1.0.0-preview26 244 10/25/2023
1.0.0-preview25 230 10/23/2023
1.0.0-preview24 241 10/23/2023
1.0.0-preview23 232 10/23/2023
1.0.0-preview22 219 10/23/2023
1.0.0-preview21 228 10/23/2023
1.0.0-preview20 248 10/20/2023
1.0.0-preview19 237 10/19/2023
1.0.0-preview18 259 10/18/2023
1.0.0-preview16 268 10/11/2023
1.0.0-preview14 199 10/10/2023
1.0.0-preview13 196 10/10/2023
1.0.0-preview12 192 10/9/2023
1.0.0-preview11 205 10/9/2023
1.0.0-preview101 211 1/5/2024