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