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