You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
1 year ago | |
|---|---|---|
| .. | ||
| LINGYUN/Abp/Notifications | 2 years ago | |
| FodyWeavers.xml | 2 years ago | |
| FodyWeavers.xsd | 2 years ago | |
| LINGYUN.Abp.Notifications.Core.csproj | 2 years ago | |
| README.EN.md | 1 year ago | |
| README.md | 1 year ago | |
README.md
LINGYUN.Abp.Notifications.Core
通知系统的核心模块,提供了通知系统的基础功能和定义。
功能特性
- 通知定义管理
- 通知组定义管理
- 可扩展的通知提供者机制
- 支持自定义通知定义提供者
模块引用
[DependsOn(typeof(AbpNotificationsCoreModule))]
public class YouProjectModule : AbpModule
{
// other
}
配置项
{
"Notifications": {
"DeletedNotifications": [], // 需要删除的通知定义列表
"DeletedNotificationGroups": [] // 需要删除的通知组定义列表
}
}
基本用法
- 实现自定义通知定义提供者
public class YourNotificationDefinitionProvider : NotificationDefinitionProvider
{
public override void Define(INotificationDefinitionContext context)
{
// 定义通知
context.Add(
new NotificationDefinition(
name: "YourNotification",
displayName: L("YourNotification"),
description: L("YourNotificationDescription"),
notificationType: NotificationType.Application,
lifetime: NotificationLifetime.Persistent,
allowSubscriptionToClients: true)
);
}
}
- 注册通知定义提供者
Configure<AbpNotificationsOptions>(options =>
{
options.DefinitionProviders.Add<YourNotificationDefinitionProvider>();
});