SquidStd.Services.Core
0.23.0
See the version list below for details.
dotnet add package SquidStd.Services.Core --version 0.23.0
NuGet\Install-Package SquidStd.Services.Core -Version 0.23.0
<PackageReference Include="SquidStd.Services.Core" Version="0.23.0" />
<PackageVersion Include="SquidStd.Services.Core" Version="0.23.0" />
<PackageReference Include="SquidStd.Services.Core" />
paket add SquidStd.Services.Core --version 0.23.0
#r "nuget: SquidStd.Services.Core, 0.23.0"
#:package SquidStd.Services.Core@0.23.0
#addin nuget:?package=SquidStd.Services.Core&version=0.23.0
#tool nuget:?package=SquidStd.Services.Core&version=0.23.0
<h1 align="center">SquidStd.Services.Core</h1>
Concrete implementations of the SquidStd.Core contracts, wired for DryIoc. RegisterCoreServices()
brings up the core services - JSON serializer, event bus, job system, timer wheel, main-thread
dispatcher, metrics collection, and secrets. The RegisterCoreServices(configName, configDirectory)
overload also registers the configuration core (directories, logger section, config manager) for
standalone containers. File storage moved to SquidStd.Storage (AddFileStorage()), which also
registers the storage config section.
Install
dotnet add package SquidStd.Services.Core
Usage
using DryIoc;
using SquidStd.Services.Core.Extensions;
var container = new Container();
// Standalone container: config core + serializer + event bus + jobs + timer wheel
// + dispatcher + metrics + secrets.
container.RegisterCoreServices("squidstd", Directory.GetCurrentDirectory());
With SquidStdBootstrap, Create already registers the configuration core, so opt into the core
services with the parameterless overload (or pick individual ones with the granular
RegisterEventBusService(), RegisterTimerWheelService(), … methods):
using SquidStd.Services.Core.Services.Bootstrap;
var bootstrap = SquidStdBootstrap.Create(o => o.ConfigName = "squidstd");
bootstrap.ConfigureServices(c => c.RegisterCoreServices());
await bootstrap.StartAsync();
Need to inspect or override a loaded config section before services start? Register a typed hook (in-memory only - the YAML file is untouched):
bootstrap.OnConfigLoaded<SquidStdLoggerOptions>(o => o.MinimumLevel = LogLevelType.Debug);
Command dispatch
// Register a dispatcher for your context type and handlers.
container.RegisterCommandDispatcher<Session>();
container.RegisterCommandHandler<PingCommand, Session, PingHandler>();
// Dispatch (handlers auto-subscribed at bootstrap). Pass the context explicitly:
var result = await dispatcher.DispatchAsync(new PingCommand("hi"), session);
if (!result.Matched)
{
// unknown command
}
For network-driven dispatch, build the context from a seed (e.g. the originating connection):
container.RegisterCommandDispatcher<Session>();
container.RegisterCommandHandler<PingCommand, Session, PingHandler>();
container.RegisterSeededCommandDispatcher<Session, Connection, ConnectionSessionFactory>();
// in the receive loop, where the connection is known:
var seeded = container.Resolve<ISeededCommandDispatcher<Session, Connection>>();
await seeded.DispatchAsync(command, connection); // factory maps connection -> Session
Key types
| Type | Purpose |
|---|---|
RegisterDefaultServicesExtensions |
RegisterCoreServices() / RegisterConfigManagerService() entry points. |
ConfigManagerService |
YAML config load/save with env-var substitution. |
EventBusService |
In-process event bus implementation. |
CommandDispatcher<TContext> |
Typed protocol command dispatch with context. |
JobSystemService |
Background job execution. |
TimerWheelService |
Timer-wheel scheduling. |
MainThreadDispatcherService |
Main-thread work dispatch. |
MetricsCollectionService |
Metric sample aggregation. |
EventLoopService |
Frame-driven loop: drains the dispatcher and advances the timer wheel. |
Related
- Tutorial: Events, jobs & scheduling
License
MIT - part of SquidStd.
| 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
- Cronos (>= 0.13.0)
- DryIoc.dll (>= 5.4.3)
- Serilog (>= 4.3.1)
- Serilog.Sinks.Console (>= 6.1.1)
- Serilog.Sinks.File (>= 7.0.0)
- SquidStd.Abstractions (>= 0.23.0)
- SquidStd.Core (>= 0.23.0)
- SquidStd.Storage (>= 0.23.0)
- SquidStd.Storage.Abstractions (>= 0.23.0)
NuGet packages (6)
Showing the top 5 NuGet packages that depend on SquidStd.Services.Core:
| Package | Downloads |
|---|---|
|
SquidStd.Workers.Manager
Package Description |
|
|
SquidStd.AspNetCore
Package Description |
|
|
SquidStd.Mail.MailKit
Package Description |
|
|
SquidStd.Vfs
Package Description |
|
|
SquidStd.Secrets.Aws
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.27.0 | 0 | 7/7/2026 |
| 0.26.0 | 0 | 7/7/2026 |
| 0.25.0 | 64 | 7/6/2026 |
| 0.24.1 | 81 | 7/6/2026 |
| 0.24.0 | 73 | 7/6/2026 |
| 0.23.0 | 84 | 7/4/2026 |
| 0.22.0 | 77 | 7/4/2026 |
| 0.21.0 | 89 | 7/3/2026 |
| 0.20.0 | 91 | 7/3/2026 |
| 0.19.0 | 99 | 7/3/2026 |
| 0.18.0 | 91 | 7/3/2026 |
| 0.17.0 | 99 | 7/3/2026 |
| 0.16.0 | 95 | 7/3/2026 |
| 0.15.0 | 104 | 7/2/2026 |
| 0.14.1 | 100 | 7/2/2026 |
| 0.14.0 | 96 | 7/2/2026 |
| 0.13.0 | 98 | 7/2/2026 |
| 0.12.0 | 95 | 7/2/2026 |
| 0.11.0 | 99 | 7/2/2026 |
| 0.10.0 | 124 | 6/30/2026 |