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