Cirreum.Startup
1.0.121
dotnet add package Cirreum.Startup --version 1.0.121
NuGet\Install-Package Cirreum.Startup -Version 1.0.121
<PackageReference Include="Cirreum.Startup" Version="1.0.121" />
<PackageVersion Include="Cirreum.Startup" Version="1.0.121" />
<PackageReference Include="Cirreum.Startup" />
paket add Cirreum.Startup --version 1.0.121
#r "nuget: Cirreum.Startup, 1.0.121"
#:package Cirreum.Startup@1.0.121
#addin nuget:?package=Cirreum.Startup&version=1.0.121
#tool nuget:?package=Cirreum.Startup&version=1.0.121
Cirreum - Startup Library
This package defines contracts and extension methods for startup services in C# .NET and Blazor applications.
Description
Cirreum.Startup allows developers to define one or more classes that implement specific interfaces, which are then automatically executed during application startup. This is particularly useful for initializing services, performing setup tasks, or executing configuration logic before the application begins its normal operation.
Key Interfaces
1. ISystemInitializer
- Purpose: Defines a service that performs core application initialization, setup, or configuration.
- Execution Order: Runs first, before any other startup services.
- Usage: Typically used by component/library/service authors for critical system setup.
- Restrictions: Must not depend on other startup interfaces.
2. IAutoInitialize
- Purpose: Allows existing services to be automatically initialized during application startup.
- Execution Order: Runs after ISystemInitializer and before IStartupTask.
- Usage: Useful for services that need initialization before they can be used.
- Auto-registration: The system attempts to auto-register services implementing this interface — a registration your application already made always wins and is used as-is. Place the marker on the implementation (recommended — it keeps
InitializeAsyncoff the consumer-facing contract) or on its paired service interface. Non-conventional naming (the implementation name doesn't contain the interface name) requires manual registration; the scan fails loudly otherwise. - Replacement: Registering your own implementation for a discovered service's interface displaces the discovered one quietly only when your registration provably auto-initializes too (the slot still initializes, with your implementation). An occupier that cannot initialize fails loudly at startup composition — a marked implementation is never silently dropped in a way that leaves its service uninitialized.
- Initialization: Regardless of how a service was registered — auto-registered or registered manually — any registration that visibly carries
IAutoInitialize(on its service type, implementation type, or registered instance) is initialized at startup. A factory registration is only visible when the marker is on the service interface. - Single-slot: An auto-initialized service identity has exactly one registration — the one that resolves. Multiple marked implementations each get their own service identity and are resolved individually; more than one registration of a tracked identity fails loudly at composition time. Set-style services consumed as
IEnumerable<T>are initialized by their owning host, not by auto-initialization. - Fail-fast: A tracked service that no longer resolves to an
IAutoInitializeat startup (its registration was removed or replaced) fails the host with an actionable error rather than being silently skipped. To deliberately opt a container out of auto-initialization, callClearAutoInitializeServices()on its service provider.
3. IStartupTask
- Purpose: Defines a service that performs tasks after the application has been initialized.
- Execution Order: Runs last, after ISystemInitializer and IAutoInitialize.
- Customizable Priority: Includes an
Orderproperty to specify execution priority.
Important Notes
- These interfaces are intended for Singleton services (Scoped in Blazor WASM).
- Services implementing these interfaces are materialized during startup and are not disposed.
- Each interface's primary method (RunAsync, InitializeAsync, ExecuteAsync) is called only once during application startup.
Usage
Implement the appropriate interface based on your initialization needs:
- Use
ISystemInitializerfor core system setup. - Use
IAutoInitializefor general service initialization. - Use
IStartupTaskfor tasks that should run after the application is fully initialized.
Refer to individual interface documentation for detailed usage examples and restrictions.
Cirreum Foundation Framework - Layered simplicity for modern .NET
| 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
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.9)
- OpenTelemetry.Extensions.Hosting (>= 1.16.0)
NuGet packages (8)
Showing the top 5 NuGet packages that depend on Cirreum.Startup:
| Package | Downloads |
|---|---|
|
Cirreum.Components.WebAssembly
The Cirreum Component Library for WebAssembly. |
|
|
Cirreum.Runtime.Server
The Cirreum Runtime for Servers. |
|
|
Cirreum.Runtime.Messaging
Messaging services composition and the Distributed Messaging delivery engine for Cirreum server hosts: registers configured messaging providers (Azure Service Bus) as keyed IMessagingClient instances, and delivers DistributedMessage traffic with policy-driven batching, an inbound receiver, and OpenTelemetry observability. |
|
|
Cirreum.Runtime.Serverless
The Cirreum Runtime Serverless. |
|
|
Cirreum.Communications.Sms.Twilio
An Sms Library for Twilio. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.121 | 353 | 7/6/2026 |
| 1.0.120 | 157 | 7/5/2026 |
| 1.0.118 | 252 | 7/4/2026 |
| 1.0.117 | 184 | 6/5/2026 |
| 1.0.116 | 478 | 5/1/2026 |
| 1.0.115 | 417 | 4/24/2026 |
| 1.0.114 | 260 | 4/14/2026 |
| 1.0.113 | 396 | 4/9/2026 |
| 1.0.112 | 1,111 | 3/13/2026 |
| 1.0.111 | 174 | 3/12/2026 |
| 1.0.110 | 237 | 3/9/2026 |
| 1.0.109 | 297 | 3/6/2026 |
| 1.0.108 | 428 | 1/23/2026 |
| 1.0.107 | 282 | 1/21/2026 |
| 1.0.106 | 1,175 | 12/20/2025 |
| 1.0.105 | 531 | 12/16/2025 |
| 1.0.104 | 524 | 11/28/2025 |
| 1.0.103 | 646 | 11/11/2025 |
| 1.0.102 | 284 | 11/11/2025 |
| 1.0.101 | 283 | 11/11/2025 |