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.2.1
<PackageReference Include="Redeon.SuperSiteEngineCore.Web.Eltheon.Core.Features.SignalR" Version="0.9.2.1" />
paket add Redeon.SuperSiteEngineCore.Web.Eltheon.Core.Features.SignalR --version 0.9.2.1
Install-Package Redeon.SuperSiteEngineCore.Web.Eltheon.Core.Features.SignalR -Version 0.9.2.1

README

Vorschau

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

SignalR transport feature for Eltheon realtime communication. It provides Admin/User/Public hubs, hub extension points, an EventBus bridge provider, and Core.Abstractions realtime publisher implementations.

SignalR is now a transport package. Feature packages should not reference SignalR only to push admin updates or notifications. They should use Core.Abstractions ports and let the host register SignalR as one possible transport.

Install

dotnet add package Redeon.SuperSiteEngineCore.Web.Eltheon.Core.Features.SignalR

Hubs

This package provides:

  • AdminHub
  • UserHub
  • PublicHub
  • BaseAdminHub
  • BaseUserHub
  • BasePublicHub
  • ISignalRExtension

Map the hubs in the host:

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

EventBus Bridge

SignalREventProvider implements IEventProvider from Core.Abstractions and broadcasts matching events to configured SignalR hubs.

builder.Services.AddSignalREventBridge(options =>
{
    options.BroadcastAllEvents = true;
    options.DefaultRoute = new SignalREventRoute
    {
        Hub = SignalRHubTarget.Admin,
        Method = "EventBusEvent",
        Scope = SignalRClientScope.All
    };
});

AddSignalREventBridge() registers only the provider and options. It does not register the concrete EventBus. Add the Events feature in the host when EventBus dispatch is required.

Realtime Ports

SignalR can implement neutral realtime ports from Core.Abstractions:

builder.Services.AddSignalRAdminRealtimePublisher();
builder.Services.AddSignalRRealtimeNotificationPublisher();

Provided implementations:

  • SignalRAdminRealtimePublisher implements IEltheonAdminRealtimePublisher and sends admin UI events such as UpdateServices.
  • SignalRRealtimeNotificationPublisher implements IEltheonRealtimeNotificationPublisher and sends ReceiveNotification to Admin/User/Public hubs based on notification scope.

This allows Service and Notifications to stay independent of SignalR.

Extension Points

Register ISignalRExtension implementations to add hub behavior without changing the base hubs:

builder.Services.AddSingleton<ISignalRExtension, DashboardSignalRExtension>();

Diagnostics

Use standard ASP.NET Core SignalR logging plus Redeon.SuperSiteEngineCore.Web.Eltheon.Core.Features.SignalR to monitor connections, hub dispatch, route matching, and broadcast errors.