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 320 12/18/2025
2.1.1 738 12/2/2025
2.1.0 716 12/2/2025
2.0.0 283 9/17/2025
1.7.23 388 9/8/2025
1.7.22 234 9/8/2025
1.7.21 241 8/14/2025
1.7.20 277 6/23/2025
1.7.19 254 6/3/2025
1.7.18 236 5/29/2025
1.7.17 243 5/26/2025
1.7.15 191 4/12/2025
1.7.14 201 4/11/2025
1.7.13 199 3/29/2025
1.7.12 214 3/28/2025
1.7.11 207 3/28/2025
1.7.10 228 3/28/2025
1.7.9 214 3/28/2025
1.7.8 206 3/28/2025
1.7.5 249 3/17/2025
1.7.4 224 3/16/2025
1.7.3 216 3/16/2025
1.7.2 231 3/16/2025
1.7.1 265 3/11/2025
1.6.8 284 3/11/2025
1.6.7 301 3/4/2025
1.6.6 190 2/26/2025
1.6.5 207 2/20/2025
1.6.4 172 2/20/2025
1.6.3 204 2/5/2025
1.6.2 195 1/24/2025
1.6.1 194 1/24/2025
1.6.0 186 1/16/2025
1.5.2 211 1/16/2025
1.5.1 243 11/3/2024
1.5.0 218 10/26/2024
1.3.2 241 10/24/2024
1.3.0 246 10/10/2024
1.2.5 236 10/9/2024
1.2.4 231 10/8/2024
1.2.1 234 10/3/2024
1.2.0 223 9/29/2024
1.1.1 216 9/23/2024
1.1.0 234 9/18/2024
1.0.33 252 9/15/2024
1.0.28 214 8/28/2024
1.0.27 235 8/24/2024
1.0.26 197 7/7/2024
1.0.25 209 7/6/2024
1.0.24 210 6/25/2024
1.0.23 250 6/1/2024
1.0.22 253 5/14/2024
1.0.21 203 5/14/2024
1.0.20 238 4/8/2024
1.0.19 235 4/3/2024
1.0.18 255 3/23/2024
1.0.17 252 3/19/2024
1.0.16 272 3/19/2024
1.0.15 241 3/11/2024
1.0.14 257 3/10/2024
1.0.13 261 3/6/2024
1.0.12 291 3/1/2024
1.0.11 253 3/1/2024
1.0.10 244 3/1/2024
1.0.9 244 3/1/2024
1.0.8 261 2/19/2024
1.0.7 242 2/17/2024
1.0.6 226 2/17/2024
1.0.5 246 2/17/2024
1.0.4 257 2/7/2024
1.0.3 249 2/6/2024
1.0.1 255 2/6/2024
1.0.0 297 1/9/2024
1.0.0-preview99 254 12/22/2023
1.0.0-preview98 223 12/21/2023
1.0.0-preview97 217 12/21/2023
1.0.0-preview96 250 12/20/2023
1.0.0-preview94 192 12/18/2023
1.0.0-preview93 379 12/13/2023
1.0.0-preview92 207 12/13/2023
1.0.0-preview91 259 12/12/2023
1.0.0-preview90 213 12/11/2023
1.0.0-preview89 223 12/11/2023
1.0.0-preview88 348 12/6/2023
1.0.0-preview87 217 12/6/2023
1.0.0-preview86 224 12/6/2023
1.0.0-preview85 210 12/6/2023
1.0.0-preview84 212 12/5/2023
1.0.0-preview83 263 12/5/2023
1.0.0-preview82 228 12/5/2023
1.0.0-preview81 225 12/4/2023
1.0.0-preview80 213 12/1/2023
1.0.0-preview8 172 10/9/2023
1.0.0-preview77 222 12/1/2023
1.0.0-preview76 237 12/1/2023
1.0.0-preview75 235 12/1/2023
1.0.0-preview74 244 11/26/2023
1.0.0-preview73 256 11/7/2023
1.0.0-preview72 239 11/6/2023
1.0.0-preview71 232 11/3/2023
1.0.0-preview70 243 11/2/2023
1.0.0-preview69 243 11/2/2023
1.0.0-preview68 290 11/2/2023
1.0.0-preview67 263 11/2/2023
1.0.0-preview66 219 11/2/2023
1.0.0-preview65 243 11/2/2023
1.0.0-preview64 249 11/2/2023
1.0.0-preview63 256 11/2/2023
1.0.0-preview62 240 11/1/2023
1.0.0-preview61 256 11/1/2023
1.0.0-preview60 232 11/1/2023
1.0.0-preview59 235 11/1/2023
1.0.0-preview58 257 10/31/2023
1.0.0-preview57 244 10/31/2023
1.0.0-preview56 243 10/31/2023
1.0.0-preview55 227 10/31/2023
1.0.0-preview54 227 10/31/2023
1.0.0-preview53 219 10/31/2023
1.0.0-preview52 242 10/31/2023
1.0.0-preview51 241 10/31/2023
1.0.0-preview50 232 10/31/2023
1.0.0-preview48 224 10/31/2023
1.0.0-preview46 213 10/31/2023
1.0.0-preview45 226 10/31/2023
1.0.0-preview44 225 10/31/2023
1.0.0-preview43 207 10/31/2023
1.0.0-preview42 278 10/30/2023
1.0.0-preview41 246 10/30/2023
1.0.0-preview40 239 10/27/2023
1.0.0-preview39 254 10/27/2023
1.0.0-preview38 281 10/27/2023
1.0.0-preview37 238 10/27/2023
1.0.0-preview36 217 10/27/2023
1.0.0-preview35 262 10/27/2023
1.0.0-preview34 217 10/27/2023
1.0.0-preview33 236 10/26/2023
1.0.0-preview32 261 10/26/2023
1.0.0-preview31 225 10/26/2023
1.0.0-preview30 251 10/26/2023
1.0.0-preview29 255 10/26/2023
1.0.0-preview28 235 10/26/2023
1.0.0-preview27 255 10/26/2023
1.0.0-preview26 237 10/25/2023
1.0.0-preview25 246 10/23/2023
1.0.0-preview24 231 10/23/2023
1.0.0-preview23 243 10/23/2023
1.0.0-preview22 249 10/23/2023
1.0.0-preview21 263 10/23/2023
1.0.0-preview20 265 10/20/2023
1.0.0-preview19 226 10/19/2023
1.0.0-preview18 277 10/18/2023
1.0.0-preview16 298 10/11/2023
1.0.0-preview14 195 10/10/2023
1.0.0-preview13 205 10/10/2023
1.0.0-preview12 200 10/9/2023
1.0.0-preview11 181 10/9/2023
1.0.0-preview101 246 1/5/2024
1.0.0-preview10 152 10/9/2023