SquidStd.Services.Core 0.18.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package SquidStd.Services.Core --version 0.18.0
                    
NuGet\Install-Package SquidStd.Services.Core -Version 0.18.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SquidStd.Services.Core" Version="0.18.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SquidStd.Services.Core" Version="0.18.0" />
                    
Directory.Packages.props
<PackageReference Include="SquidStd.Services.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SquidStd.Services.Core --version 0.18.0
                    
#r "nuget: SquidStd.Services.Core, 0.18.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SquidStd.Services.Core@0.18.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SquidStd.Services.Core&version=0.18.0
                    
Install as a Cake Addin
#tool nuget:?package=SquidStd.Services.Core&version=0.18.0
                    
Install as a Cake Tool

<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.

License

MIT - part of SquidStd.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
Loading failed