Galosys.Foundation.AspNetCore.Notification
26.7.31.1
dotnet add package Galosys.Foundation.AspNetCore.Notification --version 26.7.31.1
NuGet\Install-Package Galosys.Foundation.AspNetCore.Notification -Version 26.7.31.1
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="Galosys.Foundation.AspNetCore.Notification" Version="26.7.31.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Galosys.Foundation.AspNetCore.Notification" Version="26.7.31.1" />
<PackageReference Include="Galosys.Foundation.AspNetCore.Notification" />
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 Galosys.Foundation.AspNetCore.Notification --version 26.7.31.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Galosys.Foundation.AspNetCore.Notification, 26.7.31.1"
#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 Galosys.Foundation.AspNetCore.Notification@26.7.31.1
#: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=Galosys.Foundation.AspNetCore.Notification&version=26.7.31.1
#tool nuget:?package=Galosys.Foundation.AspNetCore.Notification&version=26.7.31.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Galosys.Foundation.AspNetCore.Notification
Notification → AspNetCore.SignalR 桥梁子包。
为什么需要这个模块
Notification(纯抽象,无 ASP.NET Core 依赖)
定义 INotificationProvider/INotificationDispatcher
5 个外部 Provider:MailKit(邮件)、Aliyun(短信)、DingTalk、WeChat、WxPusher
AspNetCore.SignalR(通用实时基础设施,无业务语义)
提供 HubBase/IConnectionManager/MapHubs()
可为通知推送、大屏KPI、IM聊天、协作编辑等任意场景复用
AspNetCore.Notification ─── 桥梁(连接前两者)
SignalRNotificationProvider : INotificationProvider
把 Notification 的"发通知"指令,转成 IHubContext<HubBase> 的 SignalR 推送
不将 SignalRNotificationProvider 合入 Notification 或 AspNetCore.SignalR:
- 合入
Notification→ 引入 ASP.NET Core 依赖,失去纯 C# 特性(不可用于控制台/Worker) - 合入
AspNetCore.SignalR→ 引入业务抽象,不再是通用基础设施
安装
<PackageReference Include="Galosys.Foundation.AspNetCore.Notification" />
依赖
Galosys.Foundation.Notification(通知抽象层)Galosys.Foundation.AspNetCore.SignalR(SignalR 基础设施)
功能
- SignalRNotificationProvider —
INotificationProvider实现,ChannelName="in-app"。将通知通过IHubContext<HubBase>推送给在线用户。 - AspNetCoreNotificationModule — 引用即自动注册
INotificationProvider。
使用
模板应用服务注入 INotificationDispatcher 发送通知:
var request = new NotificationRequest(
Channel: "in-app",
Recipient: userIds,
Subject: title,
Content: content
);
await dispatcher.SendAsync(request, cancellationToken);
Dispatcher 路由到 SignalRNotificationProvider,通过 SignalR 推送给前端。
部署
AspNetCore.Notification 依赖 AspNetCore.SignalR 进行实时推送,多副本部署时需配置:
- Redis backplane — 跨实例消息广播,详见
AspNetCore.SignalRREADME - K8s 粘性会话 — 确保 WebSocket 落在同一 Pod,详见
AspNetCore.SignalRREADME - Hub 路由 — 默认
/signalr/inbox,由[Hub]Attribute 控制
| 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Galosys.Foundation.AspNetCore.SignalR (>= 26.7.31.1)
- Galosys.Foundation.Notification (>= 26.7.31.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 26.7.31.1 | 36 | 7/31/2026 |
| 26.7.30.1 | 53 | 7/30/2026 |
| 26.7.29.1 | 72 | 7/29/2026 |
| 26.7.28.1 | 76 | 7/28/2026 |
| 26.7.26.2 | 81 | 7/26/2026 |
| 26.7.26.1 | 87 | 7/25/2026 |
| 26.7.25.1 | 85 | 7/25/2026 |
| 26.7.24.2 | 82 | 7/24/2026 |
| 26.7.24.1 | 88 | 7/24/2026 |
| 26.7.22.1 | 89 | 7/23/2026 |
| 26.7.21.1 | 90 | 7/21/2026 |
| 26.7.20.2 | 84 | 7/20/2026 |
| 26.7.20.1 | 84 | 7/20/2026 |
| 26.7.19.3 | 81 | 7/19/2026 |
| 26.7.19.2 | 82 | 7/19/2026 |
| 26.7.19.1 | 85 | 7/19/2026 |
| 26.7.18.2 | 93 | 7/18/2026 |
| 26.7.18.1 | 86 | 7/18/2026 |
| 26.7.17.1 | 85 | 7/17/2026 |
| 26.7.14.1 | 90 | 7/14/2026 |