NuGet · nuget

Redeon.SuperSiteEngineCore.Web.Eltheon.Core.Features.SignalR

Core Feature SignalR for Eltheon Framework

Install

Install-Kommandos

dotnet add package Redeon.SuperSiteEngineCore.Web.Eltheon.Core.Features.SignalR --version 0.9.1.1
<PackageReference Include="Redeon.SuperSiteEngineCore.Web.Eltheon.Core.Features.SignalR" Version="0.9.1.1" />
paket add Redeon.SuperSiteEngineCore.Web.Eltheon.Core.Features.SignalR --version 0.9.1.1
Install-Package Redeon.SuperSiteEngineCore.Web.Eltheon.Core.Features.SignalR -Version 0.9.1.1

README

Vorschau

Redeon.SuperSiteEngineCore.Web.Eltheon.Core.Features.SignalR

Overview

This package bundles the SignalR hubs, interfaces and extension points that Eltheon uses for real-time communication between the host, admin UI and plugins. It defines opinionated hubs for Admin, Public and User channels and provides an extension model so features can contribute hub endpoints without rewriting boilerplate.

Contents

  • AdminHub, UserHub, PublicHub inherit from base hub classes that accept ISignalRExtension instances, allowing features to register hub methods in a modular way.
  • Interfaces such as ISignalRExtension, IAdminHub, IUserHub describe the contract for injecting new hub functionality or broadcasting strongly-typed payloads.
  • Factories and middleware simplify hub registration with the ASP.NET Core pipeline.

Usage

builder.Services.AddSignalR();
builder.Services.AddSingleton<ISignalRExtension, DashboardSignalRExtension>();
builder.Services.AddSignalREventBridge(options =>
{
    options.BroadcastAllEvents = true; // send all events to AdminHub->EventBusEvent
    options.Routes.Add(new SignalREventRoute
    {
        EventName = "Notification.Created",
        Hub = SignalRHubTarget.User,
        Method = "NotificationEvent",
        Scope = SignalRClientScope.User,
        Target = "{user-id}" // replace with actual user identifier when routing users
    });
});

In your host, map the included hubs:

app.MapHub<AdminHub>("/hub/admin");
app.MapHub<UserHub>("/hub/user");
app.MapHub<PublicHub>("/hub/public");

Extensions implementing ISignalRExtension can inject hub methods by overriding the base hub’s Register pattern, enabling features such as the Service dashboard to push updates without referencing the host project.

EventBus Bridge

  • SignalREventProvider implements IEventProvider and broadcasts matched events to the configured hub/method.
  • Configure via AddSignalREventBridge (above); set Routes for specific EventNames or BroadcastAllEvents to stream everything to DefaultRoute (AdminHub, method EventBusEvent, All).
  • Scope supports All, Group, or User; for Group/User the Target value is required.

Diagnostics

Because hubs are regular SignalR hubs, standard logging applies. Enable Microsoft.AspNetCore.SignalR plus Redeon.SuperSiteEngineCore.Web.Eltheon.Core.Features.SignalR to monitor connection lifecycle, group membership and broadcast outcomes. When combined with the Service or AdminDashboard features, these hubs become the transport for operational telemetry.