You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The effective order is: load configuration, apply config hooks, configure the logger, start
49
+
services. Hooks are re-applied on every configuration load, so overrides are never lost. See
50
+
[Inspecting and overriding loaded configuration](../guides/configuration.md#inspecting-and-overriding-loaded-configuration) for more examples.
51
+
34
52
## Migrating to 0.15: explicit core services
35
53
36
54
Up to 0.14, `SquidStdBootstrap.Create` registered every core service on creation. From 0.15 the bootstrap registers only the configuration core - `DirectoriesConfig`, the `logger` config section and the config manager. The remaining core services (JSON serializer, event bus, job system, main-thread dispatcher, timer wheel, metrics collection, secrets) are opted into with the parameterless `RegisterCoreServices()`:
Services implementing `ISquidStdService` participate in the lifecycle. On `StartAsync`they are started in registration order; on `StopAsync` they are stopped in reverse order, so dependencies remain available while their dependents shut down.
74
+
Services implementing `ISquidStdService` participate in the lifecycle. On `StartAsync`the configuration is loaded and the config hooks are applied, then services are started in registration order; on `StopAsync` they are stopped in reverse order, so dependencies remain available while their dependents shut down.
57
75
58
76
The bootstrap logs its whole lifecycle: a startup banner with the application name and version (set `SquidStdOptions.AppName`; it defaults to the entry assembly name and is attached to every event as the `Application` / `ApplicationVersion` properties), a registration summary (per-registration detail at Debug), one line per service started with its duration, and the shutdown sequence. A service that fails to stop is logged as a warning and the remaining services are still stopped. Extra Serilog sinks can be plugged by registering `ILogEventSink` instances in the container before start.
Copy file name to clipboardExpand all lines: docs/tutorials/getting-started.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,7 +48,8 @@ The host starts, logs the service lifecycle, and waits until you press Ctrl+C.
48
48
## How it works
49
49
50
50
`SquidStdBootstrap` is the composition root: it builds the container, registers the configuration core, loads
51
-
the config sections, and orchestrates the `ISquidStdService` lifecycle. The core services come from the
51
+
the config sections, and orchestrates the `ISquidStdService` lifecycle. Need to inspect or tweak a loaded
52
+
value before services start? See [Inspecting and overriding loaded configuration](../articles/guides/configuration.md#inspecting-and-overriding-loaded-configuration). The core services come from the
52
53
explicit `RegisterCoreServices()` call in `ConfigureServices`, and every other SquidStd module plugs into the
53
54
same container through its `Add…` extension methods.
0 commit comments