Skip to content

Latest commit

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

BeyondNet.Bootstrapper

A lightweight, extensible library for orchestrating .NET application startup

English | Español

NuGetBuild


Welcome to BeyondNet.Bootstrapper! A lightweight, extensible library for orchestrating the startup sequence of any .NET application or library. Based on the Composite pattern, it lets you encapsulate each initialization step as an independent, testable unit.

Built on .NET 10 with full support for async/await, Nullable Reference Types, and a Cloud Native observability stack.

Installation

NuGet Packages

# Core (always required)
dotnet add package BeyondNetCode.Shell.Bootstrapper
# Official adapters (add as needed)
dotnet add package BeyondNetCode.Shell.Bootstrapper.DependencyInjection
dotnet add package BeyondNetCode.Shell.Bootstrapper.AutoMapper
dotnet add package BeyondNetCode.Shell.Bootstrapper.Observability

Packages Overview

PackageDescriptionNuGet
BeyondNetCode.Shell.BootstrapperCore bootstrapper with Composite patternlink
BeyondNetCode.Shell.Bootstrapper.DependencyInjectionDI extension adapterlink
BeyondNetCode.Shell.Bootstrapper.AutoMapperAutoMapper configuration adapterlink
BeyondNetCode.Shell.Bootstrapper.ObservabilityOpenTelemetry + Serilog adapterlink

Why BeyondNet.Bootstrapper?

Without a standard, startup code tends to become a monolithic block in Program.cs that is hard to test and maintain. This library solves that by enforcing a single rule:

Each initialization concern lives in its own class. The Composite runs them in order.

Benefits:

  • Each bootstrapper is independently unit-testable
  • The startup sequence is explicit and readable
  • Adding or removing a step never changes surrounding code
  • Async I/O at startup cannot deadlock the application

Quick Start

Synchronous Bootstrapper

publicclassMyBootstrapper:IBootstrapper{publicvoidRun(){// Initialize your serviceConsole.WriteLine("Bootstrap complete!");}}// UsenewCompositeBootstrapper().Add(newMyBootstrapper()).Run();

Asynchronous Bootstrapper

publicclassMyAsyncBootstrapper:IBootstrapperAsync{publicasyncTaskRunAsync(){awaitTask.Delay(100);Console.WriteLine("Async bootstrap complete!");}}// UseawaitnewCompositeBootstrapperAsync().Add(newMyAsyncBootstrapper()).RunAsync();

Combining with Adapters

varcomposite=newCompositeBootstrapperAsync().Add(newDependencyInjectionBootstrapper(services =>{services.AddSingleton<IMyService,MyService>();})).Add(newAutoMapperBootstrapper(cfg =>{cfg.CreateMap<Source,Dest>();})).Add(newObservabilityBootstrapper(services,config)).Add(newMyCustomBootstrapper());awaitcomposite.RunAsync();

Documentation

For detailed documentation, see the language-specific README files:

Migration from Ums.Shell.Bootstrapper

If you were using Ums.Shell.Bootstrapper, update your NuGet references:

# Before (Ums.Shell.Bootstrapper)
dotnet add package Ums.Shell.Bootstrapper
# After (BeyondNetCode.Shell.Bootstrapper)
dotnet add package BeyondNetCode.Shell.Bootstrapper

Update namespaces in your code:

// BeforeusingUms.Shell.Bootstrapper;// AfterusingBeyondNetCode.Shell.Bootstrapper;

Contributing

See CONTRIBUTING.md for GitFlow workflow, commit conventions, and coding standards.

Versioning

See VERSIONING.md for SemVer strategy and release process.

License

Licensed under the Apache 2.0 License. See LICENSE for details.

Acknowledgments

See DISCLAIMER.md for original code authorship attribution.

About

Lightweight .NET bootstrapper library for orchestrating application startup with async support, Composite pattern, DI, AutoMapper, and observability adapters.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages