Indiko.Common.Runtime.Abstractions
2.1.1
dotnet add package Indiko.Common.Runtime.Abstractions --version 2.1.1
NuGet\Install-Package Indiko.Common.Runtime.Abstractions -Version 2.1.1
<PackageReference Include="Indiko.Common.Runtime.Abstractions" Version="2.1.1" />
<PackageVersion Include="Indiko.Common.Runtime.Abstractions" Version="2.1.1" />
<PackageReference Include="Indiko.Common.Runtime.Abstractions" />
paket add Indiko.Common.Runtime.Abstractions --version 2.1.1
#r "nuget: Indiko.Common.Runtime.Abstractions, 2.1.1"
#:package Indiko.Common.Runtime.Abstractions@2.1.1
#addin nuget:?package=Indiko.Common.Runtime.Abstractions&version=2.1.1
#tool nuget:?package=Indiko.Common.Runtime.Abstractions&version=2.1.1
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
- Separation of Concerns: Clean separation between bootstrapping logic and application configuration
- Reusability: Bootstrapper can be reused across multiple applications with different startup classes
- Type Safety: Generic constraints ensure startup classes implement required interfaces
- Singleton Pattern: Built-in singleton ensures only one bootstrapper instance per application
- Error Handling: Robust error handling during instance creation and initialization
Architecture
The bootstrapper pattern follows these principles:
- Lazy Initialization: Bootstrapper instances are created only when first accessed
- Generic Constraints: Type safety through generic parameters and constraints
- Async First: Async/await support throughout the lifecycle
- 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.
Related Packages
Indiko.Common.Abstractions- Core abstractions and base typesIndiko.Hosting.Abstractions- Hosting-specific abstractionsIndiko.Hosting.Web- Web application hosting implementation
| Product | Versions 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. |
-
net10.0
- Indiko.Blocks.Configuration.Abstractions (>= 2.1.1)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.0)
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.1 | 80 | 12/2/2025 |
| 2.1.0 | 77 | 12/2/2025 |
| 2.0.0 | 270 | 9/17/2025 |
| 1.7.23 | 374 | 9/8/2025 |
| 1.7.22 | 223 | 9/8/2025 |
| 1.7.21 | 228 | 8/14/2025 |
| 1.7.20 | 264 | 6/23/2025 |
| 1.7.19 | 241 | 6/3/2025 |
| 1.7.18 | 221 | 5/29/2025 |
| 1.7.17 | 224 | 5/26/2025 |
| 1.7.15 | 178 | 4/12/2025 |
| 1.7.14 | 189 | 4/11/2025 |
| 1.7.13 | 185 | 3/29/2025 |
| 1.7.12 | 203 | 3/28/2025 |
| 1.7.11 | 194 | 3/28/2025 |
| 1.7.10 | 218 | 3/28/2025 |
| 1.7.9 | 198 | 3/28/2025 |
| 1.7.8 | 191 | 3/28/2025 |
| 1.7.5 | 231 | 3/17/2025 |
| 1.7.4 | 204 | 3/16/2025 |
| 1.7.3 | 201 | 3/16/2025 |
| 1.7.2 | 214 | 3/16/2025 |
| 1.7.1 | 249 | 3/11/2025 |
| 1.6.8 | 265 | 3/11/2025 |
| 1.6.7 | 287 | 3/4/2025 |
| 1.6.6 | 177 | 2/26/2025 |
| 1.6.5 | 192 | 2/20/2025 |
| 1.6.4 | 160 | 2/20/2025 |
| 1.6.3 | 187 | 2/5/2025 |
| 1.6.2 | 184 | 1/24/2025 |
| 1.6.1 | 176 | 1/24/2025 |
| 1.6.0 | 167 | 1/16/2025 |
| 1.5.2 | 196 | 1/16/2025 |
| 1.5.1 | 226 | 11/3/2024 |
| 1.5.0 | 204 | 10/26/2024 |
| 1.3.2 | 221 | 10/24/2024 |
| 1.3.0 | 227 | 10/10/2024 |
| 1.2.5 | 223 | 10/9/2024 |
| 1.2.4 | 216 | 10/8/2024 |
| 1.2.1 | 218 | 10/3/2024 |
| 1.2.0 | 212 | 9/29/2024 |
| 1.1.1 | 204 | 9/23/2024 |
| 1.1.0 | 213 | 9/18/2024 |
| 1.0.33 | 238 | 9/15/2024 |
| 1.0.28 | 198 | 8/28/2024 |
| 1.0.27 | 223 | 8/24/2024 |
| 1.0.26 | 186 | 7/7/2024 |
| 1.0.25 | 193 | 7/6/2024 |
| 1.0.24 | 196 | 6/25/2024 |
| 1.0.23 | 233 | 6/1/2024 |
| 1.0.22 | 240 | 5/14/2024 |
| 1.0.21 | 193 | 5/14/2024 |
| 1.0.20 | 225 | 4/8/2024 |
| 1.0.19 | 224 | 4/3/2024 |
| 1.0.18 | 238 | 3/23/2024 |
| 1.0.17 | 229 | 3/19/2024 |
| 1.0.16 | 258 | 3/19/2024 |
| 1.0.15 | 227 | 3/11/2024 |
| 1.0.14 | 246 | 3/10/2024 |
| 1.0.13 | 245 | 3/6/2024 |
| 1.0.12 | 274 | 3/1/2024 |
| 1.0.11 | 233 | 3/1/2024 |
| 1.0.10 | 227 | 3/1/2024 |
| 1.0.9 | 229 | 3/1/2024 |
| 1.0.8 | 248 | 2/19/2024 |
| 1.0.7 | 230 | 2/17/2024 |
| 1.0.6 | 213 | 2/17/2024 |
| 1.0.5 | 229 | 2/17/2024 |
| 1.0.4 | 248 | 2/7/2024 |
| 1.0.3 | 235 | 2/6/2024 |
| 1.0.1 | 244 | 2/6/2024 |
| 1.0.0 | 279 | 1/9/2024 |
| 1.0.0-preview99 | 239 | 12/22/2023 |
| 1.0.0-preview98 | 212 | 12/21/2023 |
| 1.0.0-preview97 | 202 | 12/21/2023 |
| 1.0.0-preview96 | 227 | 12/20/2023 |
| 1.0.0-preview94 | 176 | 12/18/2023 |
| 1.0.0-preview93 | 367 | 12/13/2023 |
| 1.0.0-preview92 | 190 | 12/13/2023 |
| 1.0.0-preview91 | 240 | 12/12/2023 |
| 1.0.0-preview90 | 195 | 12/11/2023 |
| 1.0.0-preview89 | 211 | 12/11/2023 |
| 1.0.0-preview88 | 335 | 12/6/2023 |
| 1.0.0-preview87 | 205 | 12/6/2023 |
| 1.0.0-preview86 | 207 | 12/6/2023 |
| 1.0.0-preview85 | 192 | 12/6/2023 |
| 1.0.0-preview84 | 198 | 12/5/2023 |
| 1.0.0-preview83 | 248 | 12/5/2023 |
| 1.0.0-preview82 | 215 | 12/5/2023 |
| 1.0.0-preview81 | 208 | 12/4/2023 |
| 1.0.0-preview80 | 195 | 12/1/2023 |
| 1.0.0-preview8 | 161 | 10/9/2023 |
| 1.0.0-preview77 | 208 | 12/1/2023 |
| 1.0.0-preview76 | 223 | 12/1/2023 |
| 1.0.0-preview75 | 216 | 12/1/2023 |
| 1.0.0-preview74 | 230 | 11/26/2023 |
| 1.0.0-preview73 | 241 | 11/7/2023 |
| 1.0.0-preview72 | 226 | 11/6/2023 |
| 1.0.0-preview71 | 220 | 11/3/2023 |
| 1.0.0-preview70 | 228 | 11/2/2023 |
| 1.0.0-preview69 | 231 | 11/2/2023 |
| 1.0.0-preview68 | 274 | 11/2/2023 |
| 1.0.0-preview67 | 248 | 11/2/2023 |
| 1.0.0-preview66 | 208 | 11/2/2023 |
| 1.0.0-preview65 | 228 | 11/2/2023 |
| 1.0.0-preview64 | 236 | 11/2/2023 |
| 1.0.0-preview63 | 245 | 11/2/2023 |
| 1.0.0-preview62 | 221 | 11/1/2023 |
| 1.0.0-preview61 | 237 | 11/1/2023 |
| 1.0.0-preview60 | 223 | 11/1/2023 |
| 1.0.0-preview59 | 220 | 11/1/2023 |
| 1.0.0-preview58 | 243 | 10/31/2023 |
| 1.0.0-preview57 | 226 | 10/31/2023 |
| 1.0.0-preview56 | 224 | 10/31/2023 |
| 1.0.0-preview55 | 209 | 10/31/2023 |
| 1.0.0-preview54 | 213 | 10/31/2023 |
| 1.0.0-preview53 | 206 | 10/31/2023 |
| 1.0.0-preview52 | 230 | 10/31/2023 |
| 1.0.0-preview51 | 229 | 10/31/2023 |
| 1.0.0-preview50 | 221 | 10/31/2023 |
| 1.0.0-preview48 | 205 | 10/31/2023 |
| 1.0.0-preview46 | 200 | 10/31/2023 |
| 1.0.0-preview45 | 211 | 10/31/2023 |
| 1.0.0-preview44 | 212 | 10/31/2023 |
| 1.0.0-preview43 | 190 | 10/31/2023 |
| 1.0.0-preview42 | 266 | 10/30/2023 |
| 1.0.0-preview41 | 231 | 10/30/2023 |
| 1.0.0-preview40 | 225 | 10/27/2023 |
| 1.0.0-preview39 | 233 | 10/27/2023 |
| 1.0.0-preview38 | 268 | 10/27/2023 |
| 1.0.0-preview37 | 225 | 10/27/2023 |
| 1.0.0-preview36 | 206 | 10/27/2023 |
| 1.0.0-preview35 | 248 | 10/27/2023 |
| 1.0.0-preview34 | 201 | 10/27/2023 |
| 1.0.0-preview33 | 225 | 10/26/2023 |
| 1.0.0-preview32 | 246 | 10/26/2023 |
| 1.0.0-preview31 | 212 | 10/26/2023 |
| 1.0.0-preview30 | 238 | 10/26/2023 |
| 1.0.0-preview29 | 241 | 10/26/2023 |
| 1.0.0-preview28 | 221 | 10/26/2023 |
| 1.0.0-preview27 | 241 | 10/26/2023 |
| 1.0.0-preview26 | 217 | 10/25/2023 |
| 1.0.0-preview25 | 234 | 10/23/2023 |
| 1.0.0-preview24 | 216 | 10/23/2023 |
| 1.0.0-preview23 | 221 | 10/23/2023 |
| 1.0.0-preview22 | 237 | 10/23/2023 |
| 1.0.0-preview21 | 246 | 10/23/2023 |
| 1.0.0-preview20 | 249 | 10/20/2023 |
| 1.0.0-preview19 | 210 | 10/19/2023 |
| 1.0.0-preview18 | 262 | 10/18/2023 |
| 1.0.0-preview16 | 287 | 10/11/2023 |
| 1.0.0-preview14 | 183 | 10/10/2023 |
| 1.0.0-preview13 | 195 | 10/10/2023 |
| 1.0.0-preview12 | 186 | 10/9/2023 |
| 1.0.0-preview11 | 170 | 10/9/2023 |
| 1.0.0-preview101 | 225 | 1/5/2024 |
| 1.0.0-preview10 | 135 | 10/9/2023 |