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 332 12/18/2025
2.1.1 739 12/2/2025
2.1.0 716 12/2/2025
2.0.0 285 9/17/2025
1.7.23 389 9/8/2025
1.7.22 237 9/8/2025
1.7.21 243 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 245 5/26/2025
1.7.15 191 4/12/2025
1.7.14 201 4/11/2025
1.7.13 201 3/29/2025
1.7.12 214 3/28/2025
1.7.11 208 3/28/2025
1.7.10 230 3/28/2025
1.7.9 215 3/28/2025
1.7.8 209 3/28/2025
1.7.5 251 3/17/2025
1.7.4 225 3/16/2025
1.7.3 218 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 192 2/26/2025
1.6.5 208 2/20/2025
1.6.4 172 2/20/2025
1.6.3 204 2/5/2025
1.6.2 197 1/24/2025
1.6.1 196 1/24/2025
1.6.0 186 1/16/2025
1.5.2 213 1/16/2025
1.5.1 243 11/3/2024
1.5.0 219 10/26/2024
1.3.2 241 10/24/2024
1.3.0 248 10/10/2024
1.2.5 238 10/9/2024
1.2.4 231 10/8/2024
1.2.1 235 10/3/2024
1.2.0 225 9/29/2024
1.1.1 218 9/23/2024
1.1.0 234 9/18/2024
1.0.33 253 9/15/2024
1.0.28 215 8/28/2024
1.0.27 237 8/24/2024
1.0.26 197 7/7/2024
1.0.25 210 7/6/2024
1.0.24 210 6/25/2024
1.0.23 250 6/1/2024
1.0.22 256 5/14/2024
1.0.21 203 5/14/2024
1.0.20 238 4/8/2024
1.0.19 236 4/3/2024
1.0.18 256 3/23/2024
1.0.17 253 3/19/2024
1.0.16 274 3/19/2024
1.0.15 242 3/11/2024
1.0.14 258 3/10/2024
1.0.13 262 3/6/2024
1.0.12 294 3/1/2024
1.0.11 253 3/1/2024
1.0.10 245 3/1/2024
1.0.9 244 3/1/2024
1.0.8 262 2/19/2024
1.0.7 242 2/17/2024
1.0.6 227 2/17/2024
1.0.5 248 2/17/2024
1.0.4 259 2/7/2024
1.0.3 252 2/6/2024
1.0.1 255 2/6/2024
1.0.0 299 1/9/2024
1.0.0-preview99 257 12/22/2023
1.0.0-preview98 224 12/21/2023
1.0.0-preview97 219 12/21/2023
1.0.0-preview96 251 12/20/2023
1.0.0-preview94 193 12/18/2023
1.0.0-preview93 382 12/13/2023
1.0.0-preview92 207 12/13/2023
1.0.0-preview91 259 12/12/2023
1.0.0-preview90 214 12/11/2023
1.0.0-preview89 224 12/11/2023
1.0.0-preview88 349 12/6/2023
1.0.0-preview87 217 12/6/2023
1.0.0-preview86 225 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 228 12/4/2023
1.0.0-preview80 217 12/1/2023
1.0.0-preview8 173 10/9/2023
1.0.0-preview77 222 12/1/2023
1.0.0-preview76 238 12/1/2023
1.0.0-preview75 236 12/1/2023
1.0.0-preview74 245 11/26/2023
1.0.0-preview73 256 11/7/2023
1.0.0-preview72 241 11/6/2023
1.0.0-preview71 234 11/3/2023
1.0.0-preview70 244 11/2/2023
1.0.0-preview69 244 11/2/2023
1.0.0-preview68 294 11/2/2023
1.0.0-preview67 264 11/2/2023
1.0.0-preview66 221 11/2/2023
1.0.0-preview65 243 11/2/2023
1.0.0-preview64 250 11/2/2023
1.0.0-preview63 258 11/2/2023
1.0.0-preview62 243 11/1/2023
1.0.0-preview61 257 11/1/2023
1.0.0-preview60 232 11/1/2023
1.0.0-preview59 235 11/1/2023
1.0.0-preview58 259 10/31/2023
1.0.0-preview57 244 10/31/2023
1.0.0-preview56 246 10/31/2023
1.0.0-preview55 229 10/31/2023
1.0.0-preview54 228 10/31/2023
1.0.0-preview53 219 10/31/2023
1.0.0-preview52 242 10/31/2023
1.0.0-preview51 243 10/31/2023
1.0.0-preview50 232 10/31/2023
1.0.0-preview48 224 10/31/2023
1.0.0-preview46 215 10/31/2023
1.0.0-preview45 226 10/31/2023
1.0.0-preview44 225 10/31/2023
1.0.0-preview43 209 10/31/2023
1.0.0-preview42 278 10/30/2023
1.0.0-preview41 246 10/30/2023
1.0.0-preview40 240 10/27/2023
1.0.0-preview39 254 10/27/2023
1.0.0-preview38 282 10/27/2023
1.0.0-preview37 239 10/27/2023
1.0.0-preview36 217 10/27/2023
1.0.0-preview35 263 10/27/2023
1.0.0-preview34 219 10/27/2023
1.0.0-preview33 236 10/26/2023
1.0.0-preview32 263 10/26/2023
1.0.0-preview31 228 10/26/2023
1.0.0-preview30 253 10/26/2023
1.0.0-preview29 257 10/26/2023
1.0.0-preview28 238 10/26/2023
1.0.0-preview27 256 10/26/2023
1.0.0-preview26 239 10/25/2023
1.0.0-preview25 246 10/23/2023
1.0.0-preview24 232 10/23/2023
1.0.0-preview23 246 10/23/2023
1.0.0-preview22 252 10/23/2023
1.0.0-preview21 265 10/23/2023
1.0.0-preview20 265 10/20/2023
1.0.0-preview19 229 10/19/2023
1.0.0-preview18 279 10/18/2023
1.0.0-preview16 299 10/11/2023
1.0.0-preview14 196 10/10/2023
1.0.0-preview13 208 10/10/2023
1.0.0-preview12 201 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