Indiko.Common.Runtime.Abstractions 2.1.2

dotnet add package Indiko.Common.Runtime.Abstractions --version 2.1.2
                    
NuGet\Install-Package Indiko.Common.Runtime.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.Common.Runtime.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.Common.Runtime.Abstractions" Version="2.1.2" />
                    
Directory.Packages.props
<PackageReference Include="Indiko.Common.Runtime.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.Common.Runtime.Abstractions --version 2.1.2
                    
#r "nuget: Indiko.Common.Runtime.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.Common.Runtime.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.Common.Runtime.Abstractions&version=2.1.2
                    
Install as a Cake Addin
#tool nuget:?package=Indiko.Common.Runtime.Abstractions&version=2.1.2
                    
Install as a Cake Tool

Indiko.Common.Runtime.Abstractions

Runtime abstractions for application bootstrapping and startup configuration in the Indiko framework.

Overview

This package provides base classes and interfaces for implementing custom bootstrappers and startup classes, enabling standardized application initialization patterns.

Features

  • Base Bootstrapper: Abstract base class for application bootstrapping with lifecycle management
  • Singleton Pattern: Built-in lazy singleton implementation for bootstrapper instances
  • Startup Abstractions: Interfaces for defining application startup configuration
  • Type-Safe Constraints: Generic constraints ensuring proper startup class implementations
  • Async Support: Asynchronous application initialization and execution

Installation

dotnet add package Indiko.Common.Runtime.Abstractions

Key Components

IBaseStartup

Base interface for startup classes that configure application services and middleware.

public interface IBaseStartup
{
    // Marker interface for startup classes
}

IServiceBootstrapper<TStartupConstraint>

Interface for bootstrappers that initialize applications with specific startup types.

BaseBootstrapper<TBootstrapper, TStartupConstraint>

Abstract base class providing bootstrapping functionality with singleton pattern and lifecycle management.

Usage Example

Creating a Custom Bootstrapper

using Indiko.Common.Runtime.Abstractions;
using Indiko.Common.Runtime.Abstractions.Interfaces;

// Define your startup interface
public interface IWebStartup : IBaseStartup
{
    void ConfigureServices(IServiceCollection services);
    void Configure(IApplicationBuilder app);
}

// Implement the bootstrapper
public class WebBootstrapper : BaseBootstrapper<WebBootstrapper, IWebStartup>
{
    public override async Task<int> RunAsync<TStartup>(string[] args)
        where TStartup : class, IWebStartup
    {
        try
        {
            var builder = WebApplication.CreateBuilder(args);
            
            var startup = Activator.CreateInstance<TStartup>();
            startup.ConfigureServices(builder.Services);
            
            var app = builder.Build();
            startup.Configure(app);
            
            await app.RunAsync();
            return 0;
        }
        catch (Exception ex)
        {
            Console.WriteLine($"Application failed: {ex.Message}");
            return 1;
        }
    }
}

// Implement the startup class
public class Startup : IWebStartup
{
    public void ConfigureServices(IServiceCollection services)
    {
        services.AddControllers();
        // ... configure services
    }
    
    public void Configure(IApplicationBuilder app)
    {
        app.UseRouting();
        app.UseEndpoints(endpoints => endpoints.MapControllers());
        // ... configure middleware
    }
}

// Use the bootstrapper
class Program
{
    static async Task<int> Main(string[] args)
    {
        return await WebBootstrapper.Instance.RunAsync<Startup>(args);
    }
}

Benefits

  1. Separation of Concerns: Clean separation between bootstrapping logic and application configuration
  2. Reusability: Bootstrapper can be reused across multiple applications with different startup classes
  3. Type Safety: Generic constraints ensure startup classes implement required interfaces
  4. Singleton Pattern: Built-in singleton ensures only one bootstrapper instance per application
  5. Error Handling: Robust error handling during instance creation and initialization

Architecture

The bootstrapper pattern follows these principles:

  1. Lazy Initialization: Bootstrapper instances are created only when first accessed
  2. Generic Constraints: Type safety through generic parameters and constraints
  3. Async First: Async/await support throughout the lifecycle
  4. Extensibility: Abstract methods allow custom initialization logic

Target Framework

  • .NET 10

Dependencies

None - this is a zero-dependency abstraction package.

License

See LICENSE file in the repository root.

  • Indiko.Common.Abstractions - Core abstractions and base types
  • Indiko.Hosting.Abstractions - Hosting-specific abstractions
  • Indiko.Hosting.Web - Web application hosting implementation
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 (1)

Showing the top 1 NuGet packages that depend on Indiko.Common.Runtime.Abstractions:

Package Downloads
Indiko.Hosting.Abstractions

Building Blocks Hosting Abstractions

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.1.2 305 12/18/2025
2.1.1 727 12/2/2025
2.1.0 706 12/2/2025
2.0.0 279 9/17/2025
1.7.23 379 9/8/2025
1.7.22 229 9/8/2025
1.7.21 235 8/14/2025
1.7.20 270 6/23/2025
1.7.19 249 6/3/2025
1.7.18 229 5/29/2025
1.7.17 232 5/26/2025
1.7.15 185 4/12/2025
1.7.14 197 4/11/2025
1.7.13 191 3/29/2025
1.7.12 205 3/28/2025
1.7.11 201 3/28/2025
1.7.10 223 3/28/2025
1.7.9 205 3/28/2025
1.7.8 195 3/28/2025
1.7.5 239 3/17/2025
1.7.4 217 3/16/2025
1.7.3 205 3/16/2025
1.7.2 224 3/16/2025
1.7.1 256 3/11/2025
1.6.8 271 3/11/2025
1.6.7 295 3/4/2025
1.6.6 182 2/26/2025
1.6.5 197 2/20/2025
1.6.4 164 2/20/2025
1.6.3 197 2/5/2025
1.6.2 190 1/24/2025
1.6.1 186 1/24/2025
1.6.0 180 1/16/2025
1.5.2 203 1/16/2025
1.5.1 231 11/3/2024
1.5.0 209 10/26/2024
1.3.2 231 10/24/2024
1.3.0 233 10/10/2024
1.2.5 229 10/9/2024
1.2.4 222 10/8/2024
1.2.1 225 10/3/2024
1.2.0 214 9/29/2024
1.1.1 208 9/23/2024
1.1.0 223 9/18/2024
1.0.33 246 9/15/2024
1.0.28 206 8/28/2024
1.0.27 228 8/24/2024
1.0.26 193 7/7/2024
1.0.25 203 7/6/2024
1.0.24 202 6/25/2024
1.0.23 243 6/1/2024
1.0.22 249 5/14/2024
1.0.21 198 5/14/2024
1.0.20 230 4/8/2024
1.0.19 228 4/3/2024
1.0.18 243 3/23/2024
1.0.17 241 3/19/2024
1.0.16 265 3/19/2024
1.0.15 235 3/11/2024
1.0.14 251 3/10/2024
1.0.13 256 3/6/2024
1.0.12 283 3/1/2024
1.0.11 244 3/1/2024
1.0.10 235 3/1/2024
1.0.9 237 3/1/2024
1.0.8 253 2/19/2024
1.0.7 237 2/17/2024
1.0.6 219 2/17/2024
1.0.5 238 2/17/2024
1.0.4 251 2/7/2024
1.0.3 243 2/6/2024
1.0.1 249 2/6/2024
1.0.0 286 1/9/2024
1.0.0-preview99 246 12/22/2023
1.0.0-preview98 218 12/21/2023
1.0.0-preview97 207 12/21/2023
1.0.0-preview96 239 12/20/2023
1.0.0-preview94 183 12/18/2023
1.0.0-preview93 374 12/13/2023
1.0.0-preview92 199 12/13/2023
1.0.0-preview91 250 12/12/2023
1.0.0-preview90 206 12/11/2023
1.0.0-preview89 215 12/11/2023
1.0.0-preview88 341 12/6/2023
1.0.0-preview87 212 12/6/2023
1.0.0-preview86 219 12/6/2023
1.0.0-preview85 203 12/6/2023
1.0.0-preview84 202 12/5/2023
1.0.0-preview83 256 12/5/2023
1.0.0-preview82 223 12/5/2023
1.0.0-preview81 217 12/4/2023
1.0.0-preview80 204 12/1/2023
1.0.0-preview8 165 10/9/2023
1.0.0-preview77 215 12/1/2023
1.0.0-preview76 228 12/1/2023
1.0.0-preview75 225 12/1/2023
1.0.0-preview74 236 11/26/2023
1.0.0-preview73 246 11/7/2023
1.0.0-preview72 230 11/6/2023
1.0.0-preview71 223 11/3/2023
1.0.0-preview70 236 11/2/2023
1.0.0-preview69 233 11/2/2023
1.0.0-preview68 280 11/2/2023
1.0.0-preview67 254 11/2/2023
1.0.0-preview66 210 11/2/2023
1.0.0-preview65 233 11/2/2023
1.0.0-preview64 243 11/2/2023
1.0.0-preview63 253 11/2/2023
1.0.0-preview62 230 11/1/2023
1.0.0-preview61 243 11/1/2023
1.0.0-preview60 226 11/1/2023
1.0.0-preview59 228 11/1/2023
1.0.0-preview58 249 10/31/2023
1.0.0-preview57 234 10/31/2023
1.0.0-preview56 231 10/31/2023
1.0.0-preview55 218 10/31/2023
1.0.0-preview54 221 10/31/2023
1.0.0-preview53 212 10/31/2023
1.0.0-preview52 233 10/31/2023
1.0.0-preview51 235 10/31/2023
1.0.0-preview50 226 10/31/2023
1.0.0-preview48 211 10/31/2023
1.0.0-preview46 208 10/31/2023
1.0.0-preview45 218 10/31/2023
1.0.0-preview44 217 10/31/2023
1.0.0-preview43 198 10/31/2023
1.0.0-preview42 272 10/30/2023
1.0.0-preview41 236 10/30/2023
1.0.0-preview40 231 10/27/2023
1.0.0-preview39 245 10/27/2023
1.0.0-preview38 275 10/27/2023
1.0.0-preview37 231 10/27/2023
1.0.0-preview36 211 10/27/2023
1.0.0-preview35 253 10/27/2023
1.0.0-preview34 207 10/27/2023
1.0.0-preview33 231 10/26/2023
1.0.0-preview32 253 10/26/2023
1.0.0-preview31 217 10/26/2023
1.0.0-preview30 246 10/26/2023
1.0.0-preview29 245 10/26/2023
1.0.0-preview28 226 10/26/2023
1.0.0-preview27 249 10/26/2023
1.0.0-preview26 225 10/25/2023
1.0.0-preview25 237 10/23/2023
1.0.0-preview24 222 10/23/2023
1.0.0-preview23 230 10/23/2023
1.0.0-preview22 243 10/23/2023
1.0.0-preview21 255 10/23/2023
1.0.0-preview20 256 10/20/2023
1.0.0-preview19 215 10/19/2023
1.0.0-preview18 267 10/18/2023
1.0.0-preview16 293 10/11/2023
1.0.0-preview14 188 10/10/2023
1.0.0-preview13 200 10/10/2023
1.0.0-preview12 190 10/9/2023
1.0.0-preview11 175 10/9/2023
1.0.0-preview101 237 1/5/2024
1.0.0-preview10 143 10/9/2023