From 67af9e522091a00e84b0287bf221b2501d8d50bd Mon Sep 17 00:00:00 2001
From: cKey <35512826+colinin@users.noreply.github.com>
Date: Mon, 29 Aug 2022 19:26:45 +0800
Subject: [PATCH] abstract notification core module
---
aspnet-core/LINGYUN.MicroService.All.sln | 33 ++++++++++----
aspnet-core/LINGYUN.MicroService.Common.sln | 9 +++-
.../LINGYUN.MicroService.TaskManagement.sln | 9 +++-
aspnet-core/LINGYUN.MicroService.Workflow.sln | 11 ++++-
.../AbpNotificationsCommonModule.cs | 2 +-
.../FodyWeavers.xml | 3 ++
.../FodyWeavers.xsd | 30 +++++++++++++
.../LINGYUN.Abp.Notifications.Core.csproj | 16 +++++++
...pNotificationTemplateDefinitionProvider.cs | 0
.../AbpNotificationsCoreModule.cs | 44 +++++++++++++++++++
.../Notifications/AbpNotificationsOptions.cs | 17 +++++++
.../Abp/Notifications/DefaultNotifications.cs | 0
.../INotificationDefinitionContext.cs | 1 -
.../INotificationDefinitionManager.cs | 0
.../INotificationDefinitionProvider.cs | 0
.../Notifications/NotificationDefinition.cs | 0
.../NotificationDefinitionContext.cs | 1 -
.../NotificationDefinitionManager.cs | 4 +-
.../NotificationDefinitionProvider.cs | 0
.../NotificationGroupDefinition.cs | 1 -
.../Abp/Notifications/NotificationLifetime.cs | 0
.../NotificationProviderNames.cs | 0
.../Notifications/NotificationReadState.cs | 0
.../Abp/Notifications/NotificationSeverity.cs | 0
.../Abp/Notifications/NotificationType.cs | 0
.../AbpNotificationsEmailingModule.cs | 4 +-
.../Jobs/AbpNotificationsJobsModule.cs | 2 +-
.../SignalR/AbpNotificationsSignalRModule.cs | 4 +-
.../Sms/AbpNotificationsSmsModule.cs | 4 +-
.../LINGYUN.Abp.Notifications.csproj | 1 +
.../Notifications/AbpNotificationOptions.cs | 35 ---------------
...ionModule.cs => AbpNotificationsModule.cs} | 37 ++--------------
.../AbpNotificationsPublishOptions.cs | 28 ++++++++++++
.../INotificationPublishProvider.cs | 1 -
.../Internal/NotificationSender.cs | 4 +-
.../NotificationPublishProviderManager.cs | 24 +++++-----
.../LINGYUN.Abp.Notifications/README.md | 6 ---
.../AbpElsaActivitiesNotificationsModule.cs | 2 +-
.../Notifications/NotificationStore.cs | 4 +-
.../AbpNotificationsPushPlusModule.cs | 4 +-
.../AbpBackgroundTasksNotificationsModule.cs | 2 +-
...AbpNotificationsWeChatMiniProgramModule.cs | 4 +-
.../AbpNotificationsWxPusherModule.cs | 4 +-
.../PlatformManagementHttpApiHostModule.cs | 2 +-
.../BackgroundJobs/NotificationPublishJob.cs | 4 +-
.../Distributed/NotificationEventHandler.cs | 6 +--
.../AbpNotificationsTestsModule.cs | 2 +-
.../Notifications/FakeNotificationSender.cs | 4 +-
...ificationsTestsDefinitionProvider_Tests.cs | 4 +-
...tificationsWeChatMiniProgramTestsModule.cs | 2 +-
...iniProgramNotificationDataMapping_Tests.cs | 10 ++---
51 files changed, 241 insertions(+), 144 deletions(-)
create mode 100644 aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/FodyWeavers.xml
create mode 100644 aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/FodyWeavers.xsd
create mode 100644 aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN.Abp.Notifications.Core.csproj
rename aspnet-core/modules/common/{LINGYUN.Abp.Notifications => LINGYUN.Abp.Notifications.Core}/LINGYUN/Abp/Notifications/AbpNotificationTemplateDefinitionProvider.cs (100%)
create mode 100644 aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/AbpNotificationsCoreModule.cs
create mode 100644 aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/AbpNotificationsOptions.cs
rename aspnet-core/modules/common/{LINGYUN.Abp.Notifications => LINGYUN.Abp.Notifications.Core}/LINGYUN/Abp/Notifications/DefaultNotifications.cs (100%)
rename aspnet-core/modules/common/{LINGYUN.Abp.Notifications => LINGYUN.Abp.Notifications.Core}/LINGYUN/Abp/Notifications/INotificationDefinitionContext.cs (94%)
rename aspnet-core/modules/common/{LINGYUN.Abp.Notifications => LINGYUN.Abp.Notifications.Core}/LINGYUN/Abp/Notifications/INotificationDefinitionManager.cs (100%)
rename aspnet-core/modules/common/{LINGYUN.Abp.Notifications => LINGYUN.Abp.Notifications.Core}/LINGYUN/Abp/Notifications/INotificationDefinitionProvider.cs (100%)
rename aspnet-core/modules/common/{LINGYUN.Abp.Notifications => LINGYUN.Abp.Notifications.Core}/LINGYUN/Abp/Notifications/NotificationDefinition.cs (100%)
rename aspnet-core/modules/common/{LINGYUN.Abp.Notifications => LINGYUN.Abp.Notifications.Core}/LINGYUN/Abp/Notifications/NotificationDefinitionContext.cs (98%)
rename aspnet-core/modules/common/{LINGYUN.Abp.Notifications => LINGYUN.Abp.Notifications.Core}/LINGYUN/Abp/Notifications/NotificationDefinitionManager.cs (97%)
rename aspnet-core/modules/common/{LINGYUN.Abp.Notifications => LINGYUN.Abp.Notifications.Core}/LINGYUN/Abp/Notifications/NotificationDefinitionProvider.cs (100%)
rename aspnet-core/modules/common/{LINGYUN.Abp.Notifications => LINGYUN.Abp.Notifications.Core}/LINGYUN/Abp/Notifications/NotificationGroupDefinition.cs (98%)
rename aspnet-core/modules/common/{LINGYUN.Abp.Notifications => LINGYUN.Abp.Notifications.Core}/LINGYUN/Abp/Notifications/NotificationLifetime.cs (100%)
rename aspnet-core/modules/common/{LINGYUN.Abp.Notifications => LINGYUN.Abp.Notifications.Core}/LINGYUN/Abp/Notifications/NotificationProviderNames.cs (100%)
rename aspnet-core/modules/common/{LINGYUN.Abp.Notifications => LINGYUN.Abp.Notifications.Core}/LINGYUN/Abp/Notifications/NotificationReadState.cs (100%)
rename aspnet-core/modules/common/{LINGYUN.Abp.Notifications => LINGYUN.Abp.Notifications.Core}/LINGYUN/Abp/Notifications/NotificationSeverity.cs (100%)
rename aspnet-core/modules/common/{LINGYUN.Abp.Notifications => LINGYUN.Abp.Notifications.Core}/LINGYUN/Abp/Notifications/NotificationType.cs (100%)
delete mode 100644 aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/AbpNotificationOptions.cs
rename aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/{AbpNotificationModule.cs => AbpNotificationsModule.cs} (52%)
create mode 100644 aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/AbpNotificationsPublishOptions.cs
diff --git a/aspnet-core/LINGYUN.MicroService.All.sln b/aspnet-core/LINGYUN.MicroService.All.sln
index 79bda6c14..aecd2febd 100644
--- a/aspnet-core/LINGYUN.MicroService.All.sln
+++ b/aspnet-core/LINGYUN.MicroService.All.sln
@@ -462,6 +462,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.PushPlus.Settin
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Notifications.PushPlus", "modules\pushplus\LINGYUN.Abp.Notifications.PushPlus\LINGYUN.Abp.Notifications.PushPlus.csproj", "{2B7C1441-8801-4121-ABFB-03771E9DFE46}"
EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "realtime", "realtime", "{ECC8B9A9-9E92-4493-984D-2E350A49189D}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.Notifications.Core", "modules\common\LINGYUN.Abp.Notifications.Core\LINGYUN.Abp.Notifications.Core.csproj", "{62971DAE-CE71-4E9C-B6F5-514C8E2B915C}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Notifications.Jobs", "modules\common\LINGYUN.Abp.Notifications.Jobs\LINGYUN.Abp.Notifications.Jobs.csproj", "{3E9D07D8-963C-4A61-B720-BD47593BE752}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -1200,6 +1206,14 @@ Global
{2B7C1441-8801-4121-ABFB-03771E9DFE46}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2B7C1441-8801-4121-ABFB-03771E9DFE46}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2B7C1441-8801-4121-ABFB-03771E9DFE46}.Release|Any CPU.Build.0 = Release|Any CPU
+ {62971DAE-CE71-4E9C-B6F5-514C8E2B915C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {62971DAE-CE71-4E9C-B6F5-514C8E2B915C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {62971DAE-CE71-4E9C-B6F5-514C8E2B915C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {62971DAE-CE71-4E9C-B6F5-514C8E2B915C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {3E9D07D8-963C-4A61-B720-BD47593BE752}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3E9D07D8-963C-4A61-B720-BD47593BE752}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3E9D07D8-963C-4A61-B720-BD47593BE752}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {3E9D07D8-963C-4A61-B720-BD47593BE752}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -1229,11 +1243,11 @@ Global
{3CDBA2A6-DC8A-48C5-8A6C-AF207394B43D} = {C5CAD011-DF84-4914-939C-0C029DCEF26F}
{A5851F0F-CB0D-4E29-A829-D1BDEADB807B} = {3CDBA2A6-DC8A-48C5-8A6C-AF207394B43D}
{FDEECE0D-6F66-4053-948E-9AC021B97C8D} = {3CDBA2A6-DC8A-48C5-8A6C-AF207394B43D}
- {B9FA1A02-A2BF-480D-914E-0780DAE442FC} = {8AC72641-30D3-4ACF-89FA-808FADC55C2E}
- {59619184-02E7-4C61-8F96-89320CD7A3AE} = {8AC72641-30D3-4ACF-89FA-808FADC55C2E}
- {865A2AE3-864B-4425-8FA6-AFD62F6466DB} = {8AC72641-30D3-4ACF-89FA-808FADC55C2E}
- {81DF3392-38F4-41E9-8499-4F7EA8ADF4F2} = {8AC72641-30D3-4ACF-89FA-808FADC55C2E}
- {4DFA9E60-E9CE-4FD3-A57F-F76EF3FF4873} = {8AC72641-30D3-4ACF-89FA-808FADC55C2E}
+ {B9FA1A02-A2BF-480D-914E-0780DAE442FC} = {ECC8B9A9-9E92-4493-984D-2E350A49189D}
+ {59619184-02E7-4C61-8F96-89320CD7A3AE} = {ECC8B9A9-9E92-4493-984D-2E350A49189D}
+ {865A2AE3-864B-4425-8FA6-AFD62F6466DB} = {ECC8B9A9-9E92-4493-984D-2E350A49189D}
+ {81DF3392-38F4-41E9-8499-4F7EA8ADF4F2} = {ECC8B9A9-9E92-4493-984D-2E350A49189D}
+ {4DFA9E60-E9CE-4FD3-A57F-F76EF3FF4873} = {ECC8B9A9-9E92-4493-984D-2E350A49189D}
{371B293B-0CA9-4385-8EBB-5224332066D2} = {3CDBA2A6-DC8A-48C5-8A6C-AF207394B43D}
{608A3BD0-FC8D-48B0-B1C5-F3203A3BE99F} = {672E1170-7B18-474B-85C7-1961BF2A48AE}
{9E12ADBF-713B-4FE7-B71F-52B5078A57CE} = {3CDBA2A6-DC8A-48C5-8A6C-AF207394B43D}
@@ -1302,7 +1316,7 @@ Global
{3B96F4D8-4993-419B-BCEB-AFE4ED39449F} = {C5CAD011-DF84-4914-939C-0C029DCEF26F}
{FCFAF1AF-B3F6-45F3-85AB-8249EB8432CC} = {14CDBAD1-10C8-464A-B445-1F727C988010}
{97B4A37E-B93E-48C9-95D5-689CB9495D8B} = {3B96F4D8-4993-419B-BCEB-AFE4ED39449F}
- {8C3312E7-F51E-4780-A893-CE0E0B80B579} = {8AC72641-30D3-4ACF-89FA-808FADC55C2E}
+ {8C3312E7-F51E-4780-A893-CE0E0B80B579} = {ECC8B9A9-9E92-4493-984D-2E350A49189D}
{FE0F0889-C4AF-43C5-B851-B8CCC873BA2C} = {14CDBAD1-10C8-464A-B445-1F727C988010}
{B86EBB6F-A27F-4277-8265-937951A9DCB0} = {370D7CD5-1E17-4F3D-BBFA-03429F6D4F2F}
{35B17218-9FB6-439E-AF73-9A1454BC923C} = {B05CB08F-C088-4D6D-97EE-A94A5D1AE4A6}
@@ -1396,7 +1410,7 @@ Global
{902D822A-52B6-481C-96C5-ECD891FF83FC} = {9EC33D45-CCC7-41DF-829E-6B89A640FE35}
{46244C99-3A0D-4D88-9F24-2B7B586ADBA4} = {CC362C67-6FC1-42B3-A130-8120AA8D790C}
{76A5564E-033B-4AA6-A22B-78B6EB134CC6} = {9EC33D45-CCC7-41DF-829E-6B89A640FE35}
- {88502844-D83C-4541-96AC-A8291E261F63} = {8AC72641-30D3-4ACF-89FA-808FADC55C2E}
+ {88502844-D83C-4541-96AC-A8291E261F63} = {ECC8B9A9-9E92-4493-984D-2E350A49189D}
{67DC7FA0-506A-4977-95F6-BC739B2BC4BA} = {F4923692-D343-4318-AECA-96F580B1A563}
{8DF55DAB-4C1D-46F7-9324-0050F47B3BED} = {F4923692-D343-4318-AECA-96F580B1A563}
{ABD89F39-62D9-439E-8662-BE4F36BFA04F} = {C5CAD011-DF84-4914-939C-0C029DCEF26F}
@@ -1407,7 +1421,7 @@ Global
{4711320B-F98D-4CB0-BFEB-B9685B6CBCB7} = {ABD89F39-62D9-439E-8662-BE4F36BFA04F}
{130F8ED1-A64F-48DE-BF43-18EAD19CAF63} = {ABD89F39-62D9-439E-8662-BE4F36BFA04F}
{A53FE09E-6B1C-46C0-9422-C313D14AE9E4} = {ABD89F39-62D9-439E-8662-BE4F36BFA04F}
- {0CE035CF-2D8A-4559-93EC-ADBEC4237C61} = {8AC72641-30D3-4ACF-89FA-808FADC55C2E}
+ {0CE035CF-2D8A-4559-93EC-ADBEC4237C61} = {ECC8B9A9-9E92-4493-984D-2E350A49189D}
{995DB1CE-A2FC-4468-A521-4207FD587EC5} = {90E88EAC-4291-4406-8D88-EFDF61B11292}
{AFFBE8EE-1B92-4CDF-8A4F-4000B78A0154} = {9E72FEB9-A626-4312-892B-CDD043879758}
{63FCC71F-1CEF-44D3-B95B-23EE58DE8C95} = {C5CAD011-DF84-4914-939C-0C029DCEF26F}
@@ -1426,6 +1440,9 @@ Global
{82CB7E17-ED5A-4D26-B116-BA7B4226E43C} = {A8F1C9FA-4F16-43F9-8CC6-CCD124154440}
{102C3711-135E-446D-9A35-AEFB79993CAA} = {A8F1C9FA-4F16-43F9-8CC6-CCD124154440}
{2B7C1441-8801-4121-ABFB-03771E9DFE46} = {A8F1C9FA-4F16-43F9-8CC6-CCD124154440}
+ {ECC8B9A9-9E92-4493-984D-2E350A49189D} = {C5CAD011-DF84-4914-939C-0C029DCEF26F}
+ {62971DAE-CE71-4E9C-B6F5-514C8E2B915C} = {ECC8B9A9-9E92-4493-984D-2E350A49189D}
+ {3E9D07D8-963C-4A61-B720-BD47593BE752} = {ECC8B9A9-9E92-4493-984D-2E350A49189D}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C95FDF91-16F2-4A8B-A4BE-0E62D1B66718}
diff --git a/aspnet-core/LINGYUN.MicroService.Common.sln b/aspnet-core/LINGYUN.MicroService.Common.sln
index 6167bb21c..25f718c40 100644
--- a/aspnet-core/LINGYUN.MicroService.Common.sln
+++ b/aspnet-core/LINGYUN.MicroService.Common.sln
@@ -264,12 +264,14 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.WxPusher.Settin
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.PushPlus.SettingManagement", "modules\pushplus\LINGYUN.Abp.PushPlus.SettingManagement\LINGYUN.Abp.PushPlus.SettingManagement.csproj", "{4CBB4A0C-6D23-44DD-BAF4-49D69ED35839}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.Notifications.WxPusher.Tests", "tests\LINGYUN.Abp.Notifications.WxPusher.Tests\LINGYUN.Abp.Notifications.WxPusher.Tests.csproj", "{C2801414-550F-4A25-AD8D-68AC508211DC}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Notifications.WxPusher.Tests", "tests\LINGYUN.Abp.Notifications.WxPusher.Tests\LINGYUN.Abp.Notifications.WxPusher.Tests.csproj", "{C2801414-550F-4A25-AD8D-68AC508211DC}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Notifications.Tests", "tests\LINGYUN.Abp.Notifications.Tests\LINGYUN.Abp.Notifications.Tests.csproj", "{868A1718-4970-48D2-A256-08EF468302D8}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Notifications.WeChat.MiniProgram.Tests", "tests\LINGYUN.Abp.Notifications.WeChat.MiniProgram.Tests\LINGYUN.Abp.Notifications.WeChat.MiniProgram.Tests.csproj", "{B78E53AC-6BB8-402D-90CF-BEF1BD9558EB}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Notifications.Core", "modules\common\LINGYUN.Abp.Notifications.Core\LINGYUN.Abp.Notifications.Core.csproj", "{AA039B4E-CE12-43AC-8340-3D52463E971E}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -696,6 +698,10 @@ Global
{B78E53AC-6BB8-402D-90CF-BEF1BD9558EB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B78E53AC-6BB8-402D-90CF-BEF1BD9558EB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B78E53AC-6BB8-402D-90CF-BEF1BD9558EB}.Release|Any CPU.Build.0 = Release|Any CPU
+ {AA039B4E-CE12-43AC-8340-3D52463E971E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {AA039B4E-CE12-43AC-8340-3D52463E971E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {AA039B4E-CE12-43AC-8340-3D52463E971E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {AA039B4E-CE12-43AC-8340-3D52463E971E}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -830,6 +836,7 @@ Global
{C2801414-550F-4A25-AD8D-68AC508211DC} = {B86C21A4-73B7-471E-B73A-B4B905EC9435}
{868A1718-4970-48D2-A256-08EF468302D8} = {B86C21A4-73B7-471E-B73A-B4B905EC9435}
{B78E53AC-6BB8-402D-90CF-BEF1BD9558EB} = {B86C21A4-73B7-471E-B73A-B4B905EC9435}
+ {AA039B4E-CE12-43AC-8340-3D52463E971E} = {B91F26C5-B148-4094-B5F1-71E5F945DBED}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {06C707C6-02C0-411A-AD3B-2D0E13787CB8}
diff --git a/aspnet-core/LINGYUN.MicroService.TaskManagement.sln b/aspnet-core/LINGYUN.MicroService.TaskManagement.sln
index c135c6bdf..6938b9e96 100644
--- a/aspnet-core/LINGYUN.MicroService.TaskManagement.sln
+++ b/aspnet-core/LINGYUN.MicroService.TaskManagement.sln
@@ -54,7 +54,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "extend-jobs", "extend-jobs"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Notifications.Jobs", "modules\common\LINGYUN.Abp.Notifications.Jobs\LINGYUN.Abp.Notifications.Jobs.csproj", "{17D7ED0F-E789-4637-9B06-57DF693C6E1E}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.BackgroundTasks.Notifications", "modules\task-management\LINGYUN.Abp.BackgroundTasks.Notifications\LINGYUN.Abp.BackgroundTasks.Notifications.csproj", "{1978B64C-B2F5-4F68-9E5C-B45F948E7155}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.BackgroundTasks.Notifications", "modules\task-management\LINGYUN.Abp.BackgroundTasks.Notifications\LINGYUN.Abp.BackgroundTasks.Notifications.csproj", "{1978B64C-B2F5-4F68-9E5C-B45F948E7155}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "realtime", "realtime", "{18918B94-BB48-48F3-874D-B91B0252440A}"
EndProject
@@ -68,6 +68,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Dapr", "modules
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Dapr.Client", "modules\dapr\LINGYUN.Abp.Dapr.Client\LINGYUN.Abp.Dapr.Client.csproj", "{194DAB61-BC3C-4003-BFF0-C87763E7B8B0}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Notifications.Core", "modules\common\LINGYUN.Abp.Notifications.Core\LINGYUN.Abp.Notifications.Core.csproj", "{DD51A1AE-830F-4909-A729-7EBC398B17AD}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -166,6 +168,10 @@ Global
{194DAB61-BC3C-4003-BFF0-C87763E7B8B0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{194DAB61-BC3C-4003-BFF0-C87763E7B8B0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{194DAB61-BC3C-4003-BFF0-C87763E7B8B0}.Release|Any CPU.Build.0 = Release|Any CPU
+ {DD51A1AE-830F-4909-A729-7EBC398B17AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {DD51A1AE-830F-4909-A729-7EBC398B17AD}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {DD51A1AE-830F-4909-A729-7EBC398B17AD}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {DD51A1AE-830F-4909-A729-7EBC398B17AD}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -194,6 +200,7 @@ Global
{09F7171C-6DA1-4466-AB4A-DC92E93368EC} = {18918B94-BB48-48F3-874D-B91B0252440A}
{2FA23894-E598-4896-A336-3E7C682699D9} = {FA5E30C9-05E3-4E35-AEDD-7DC5534E3A01}
{194DAB61-BC3C-4003-BFF0-C87763E7B8B0} = {FA5E30C9-05E3-4E35-AEDD-7DC5534E3A01}
+ {DD51A1AE-830F-4909-A729-7EBC398B17AD} = {18918B94-BB48-48F3-874D-B91B0252440A}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {E1FD1F4C-D344-408B-97CF-B6F1F6D7D293}
diff --git a/aspnet-core/LINGYUN.MicroService.Workflow.sln b/aspnet-core/LINGYUN.MicroService.Workflow.sln
index e8ff83fd7..4bf4a9847 100644
--- a/aspnet-core/LINGYUN.MicroService.Workflow.sln
+++ b/aspnet-core/LINGYUN.MicroService.Workflow.sln
@@ -73,9 +73,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Notifications",
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.IM", "modules\common\LINGYUN.Abp.IM\LINGYUN.Abp.IM.csproj", "{8BE6BA3E-048E-4FC7-81DD-7FCD29AE2126}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.Elsa.Activities.Emailing", "modules\elsa\LINGYUN.Abp.Elsa.Activities.Emailing\LINGYUN.Abp.Elsa.Activities.Emailing.csproj", "{9E213E6F-77CB-4068-93EB-465C47FDA8FA}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Elsa.Activities.Emailing", "modules\elsa\LINGYUN.Abp.Elsa.Activities.Emailing\LINGYUN.Abp.Elsa.Activities.Emailing.csproj", "{9E213E6F-77CB-4068-93EB-465C47FDA8FA}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.Elsa.Activities", "modules\elsa\LINGYUN.Abp.Elsa.Activities\LINGYUN.Abp.Elsa.Activities.csproj", "{EEE9DF30-1901-4070-8E03-A8D8A0E10E34}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Elsa.Activities", "modules\elsa\LINGYUN.Abp.Elsa.Activities\LINGYUN.Abp.Elsa.Activities.csproj", "{EEE9DF30-1901-4070-8E03-A8D8A0E10E34}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Notifications.Core", "modules\common\LINGYUN.Abp.Notifications.Core\LINGYUN.Abp.Notifications.Core.csproj", "{CE1B9AD0-7CDA-4459-86A3-A3162C1095D9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -199,6 +201,10 @@ Global
{EEE9DF30-1901-4070-8E03-A8D8A0E10E34}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EEE9DF30-1901-4070-8E03-A8D8A0E10E34}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EEE9DF30-1901-4070-8E03-A8D8A0E10E34}.Release|Any CPU.Build.0 = Release|Any CPU
+ {CE1B9AD0-7CDA-4459-86A3-A3162C1095D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {CE1B9AD0-7CDA-4459-86A3-A3162C1095D9}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {CE1B9AD0-7CDA-4459-86A3-A3162C1095D9}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {CE1B9AD0-7CDA-4459-86A3-A3162C1095D9}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -236,6 +242,7 @@ Global
{8BE6BA3E-048E-4FC7-81DD-7FCD29AE2126} = {6DA78E72-BA55-4ECF-97DB-6258174D3E2A}
{9E213E6F-77CB-4068-93EB-465C47FDA8FA} = {F1CCBEC7-ACAB-4DC5-909E-D8CC2E1B7EEC}
{EEE9DF30-1901-4070-8E03-A8D8A0E10E34} = {F1CCBEC7-ACAB-4DC5-909E-D8CC2E1B7EEC}
+ {CE1B9AD0-7CDA-4459-86A3-A3162C1095D9} = {6DA78E72-BA55-4ECF-97DB-6258174D3E2A}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {6BB7A5DE-DA12-44DC-BC9B-0F6CA524346F}
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Common/LINGYUN/Abp/Notifications/AbpNotificationsCommonModule.cs b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Common/LINGYUN/Abp/Notifications/AbpNotificationsCommonModule.cs
index 19b1664bd..e2c2c16e6 100644
--- a/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Common/LINGYUN/Abp/Notifications/AbpNotificationsCommonModule.cs
+++ b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Common/LINGYUN/Abp/Notifications/AbpNotificationsCommonModule.cs
@@ -6,7 +6,7 @@ using Volo.Abp.VirtualFileSystem;
namespace LINGYUN.Abp.Notifications.Common;
[DependsOn(
- typeof(AbpNotificationModule))]
+ typeof(AbpNotificationsModule))]
public class AbpNotificationsCommonModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/FodyWeavers.xml b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/FodyWeavers.xml
new file mode 100644
index 000000000..1715698cc
--- /dev/null
+++ b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/FodyWeavers.xml
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/FodyWeavers.xsd b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/FodyWeavers.xsd
new file mode 100644
index 000000000..11da52550
--- /dev/null
+++ b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/FodyWeavers.xsd
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.
+
+
+
+
+ A comma-separated list of error codes that can be safely ignored in assembly verification.
+
+
+
+
+ 'false' to turn off automatic generation of the XML Schema file.
+
+
+
+
+
\ No newline at end of file
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN.Abp.Notifications.Core.csproj b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN.Abp.Notifications.Core.csproj
new file mode 100644
index 000000000..8ec720e7d
--- /dev/null
+++ b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN.Abp.Notifications.Core.csproj
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+ netstandard2.0
+
+
+
+
+
+
+
+
+
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/AbpNotificationTemplateDefinitionProvider.cs b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/AbpNotificationTemplateDefinitionProvider.cs
similarity index 100%
rename from aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/AbpNotificationTemplateDefinitionProvider.cs
rename to aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/AbpNotificationTemplateDefinitionProvider.cs
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/AbpNotificationsCoreModule.cs b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/AbpNotificationsCoreModule.cs
new file mode 100644
index 000000000..ba03e444b
--- /dev/null
+++ b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/AbpNotificationsCoreModule.cs
@@ -0,0 +1,44 @@
+using Microsoft.Extensions.DependencyInjection;
+using System;
+using System.Collections.Generic;
+using Volo.Abp.Modularity;
+using Volo.Abp.TextTemplating;
+
+namespace LINGYUN.Abp.Notifications;
+
+[DependsOn(
+ typeof(AbpTextTemplatingCoreModule))]
+public class AbpNotificationsCoreModule : AbpModule
+{
+ public override void PreConfigureServices(ServiceConfigurationContext context)
+ {
+ AutoAddDefinitionProviders(context.Services);
+ }
+
+ public override void ConfigureServices(ServiceConfigurationContext context)
+ {
+ var preActions = context.Services.GetPreConfigureActions();
+ Configure(options =>
+ {
+ preActions.Configure(options);
+ });
+ }
+
+ private void AutoAddDefinitionProviders(IServiceCollection services)
+ {
+ var definitionProviders = new List();
+
+ services.OnRegistred(context =>
+ {
+ if (typeof(INotificationDefinitionProvider).IsAssignableFrom(context.ImplementationType))
+ {
+ definitionProviders.Add(context.ImplementationType);
+ }
+ });
+
+ Configure(options =>
+ {
+ options.DefinitionProviders.AddIfNotContains(definitionProviders);
+ });
+ }
+}
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/AbpNotificationsOptions.cs b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/AbpNotificationsOptions.cs
new file mode 100644
index 000000000..2cb0cd92b
--- /dev/null
+++ b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/AbpNotificationsOptions.cs
@@ -0,0 +1,17 @@
+using Volo.Abp.Collections;
+
+namespace LINGYUN.Abp.Notifications
+{
+ public class AbpNotificationsOptions
+ {
+ ///
+ /// 自定义通知集合
+ ///
+ public ITypeList DefinitionProviders { get; }
+
+ public AbpNotificationsOptions()
+ {
+ DefinitionProviders = new TypeList();
+ }
+ }
+}
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/DefaultNotifications.cs b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/DefaultNotifications.cs
similarity index 100%
rename from aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/DefaultNotifications.cs
rename to aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/DefaultNotifications.cs
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/INotificationDefinitionContext.cs b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/INotificationDefinitionContext.cs
similarity index 94%
rename from aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/INotificationDefinitionContext.cs
rename to aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/INotificationDefinitionContext.cs
index a576eae97..e6839d1df 100644
--- a/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/INotificationDefinitionContext.cs
+++ b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/INotificationDefinitionContext.cs
@@ -1,6 +1,5 @@
using JetBrains.Annotations;
using Volo.Abp.Localization;
-using Volo.Abp.MultiTenancy;
namespace LINGYUN.Abp.Notifications
{
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/INotificationDefinitionManager.cs b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/INotificationDefinitionManager.cs
similarity index 100%
rename from aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/INotificationDefinitionManager.cs
rename to aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/INotificationDefinitionManager.cs
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/INotificationDefinitionProvider.cs b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/INotificationDefinitionProvider.cs
similarity index 100%
rename from aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/INotificationDefinitionProvider.cs
rename to aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/INotificationDefinitionProvider.cs
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/NotificationDefinition.cs b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/NotificationDefinition.cs
similarity index 100%
rename from aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/NotificationDefinition.cs
rename to aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/NotificationDefinition.cs
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/NotificationDefinitionContext.cs b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/NotificationDefinitionContext.cs
similarity index 98%
rename from aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/NotificationDefinitionContext.cs
rename to aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/NotificationDefinitionContext.cs
index 64e674e24..b0da3077c 100644
--- a/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/NotificationDefinitionContext.cs
+++ b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/NotificationDefinitionContext.cs
@@ -2,7 +2,6 @@
using System.Collections.Generic;
using Volo.Abp;
using Volo.Abp.Localization;
-using Volo.Abp.MultiTenancy;
namespace LINGYUN.Abp.Notifications
{
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/NotificationDefinitionManager.cs b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/NotificationDefinitionManager.cs
similarity index 97%
rename from aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/NotificationDefinitionManager.cs
rename to aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/NotificationDefinitionManager.cs
index 079e666a4..1261c8db9 100644
--- a/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/NotificationDefinitionManager.cs
+++ b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/NotificationDefinitionManager.cs
@@ -11,7 +11,7 @@ namespace LINGYUN.Abp.Notifications
{
public class NotificationDefinitionManager : INotificationDefinitionManager, ISingletonDependency
{
- protected AbpNotificationOptions Options { get; }
+ protected AbpNotificationsOptions Options { get; }
protected IDictionary NotificationGroupDefinitions => _lazyNotificationGroupDefinitions.Value;
private readonly Lazy> _lazyNotificationGroupDefinitions;
@@ -22,7 +22,7 @@ namespace LINGYUN.Abp.Notifications
private readonly IServiceScopeFactory _serviceScopeFactory;
public NotificationDefinitionManager(
- IOptions options,
+ IOptions options,
IServiceScopeFactory serviceScopeFactory)
{
_serviceScopeFactory = serviceScopeFactory;
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/NotificationDefinitionProvider.cs b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/NotificationDefinitionProvider.cs
similarity index 100%
rename from aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/NotificationDefinitionProvider.cs
rename to aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/NotificationDefinitionProvider.cs
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/NotificationGroupDefinition.cs b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/NotificationGroupDefinition.cs
similarity index 98%
rename from aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/NotificationGroupDefinition.cs
rename to aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/NotificationGroupDefinition.cs
index 088ba6447..019acdce1 100644
--- a/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/NotificationGroupDefinition.cs
+++ b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/NotificationGroupDefinition.cs
@@ -3,7 +3,6 @@ using System.Collections.Generic;
using System.Collections.Immutable;
using Volo.Abp;
using Volo.Abp.Localization;
-using Volo.Abp.MultiTenancy;
namespace LINGYUN.Abp.Notifications
{
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/NotificationLifetime.cs b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/NotificationLifetime.cs
similarity index 100%
rename from aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/NotificationLifetime.cs
rename to aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/NotificationLifetime.cs
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/NotificationProviderNames.cs b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/NotificationProviderNames.cs
similarity index 100%
rename from aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/NotificationProviderNames.cs
rename to aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/NotificationProviderNames.cs
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/NotificationReadState.cs b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/NotificationReadState.cs
similarity index 100%
rename from aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/NotificationReadState.cs
rename to aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/NotificationReadState.cs
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/NotificationSeverity.cs b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/NotificationSeverity.cs
similarity index 100%
rename from aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/NotificationSeverity.cs
rename to aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/NotificationSeverity.cs
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/NotificationType.cs b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/NotificationType.cs
similarity index 100%
rename from aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/NotificationType.cs
rename to aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/NotificationType.cs
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Emailing/LINGYUN/Abp/Notifications/Emailing/AbpNotificationsEmailingModule.cs b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Emailing/LINGYUN/Abp/Notifications/Emailing/AbpNotificationsEmailingModule.cs
index 396df6602..64673fcff 100644
--- a/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Emailing/LINGYUN/Abp/Notifications/Emailing/AbpNotificationsEmailingModule.cs
+++ b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Emailing/LINGYUN/Abp/Notifications/Emailing/AbpNotificationsEmailingModule.cs
@@ -5,14 +5,14 @@ using Volo.Abp.Modularity;
namespace LINGYUN.Abp.Notifications.Emailing;
[DependsOn(
- typeof(AbpNotificationModule),
+ typeof(AbpNotificationsModule),
typeof(AbpEmailingModule),
typeof(AbpIdentityDomainModule))]
public class AbpNotificationsEmailingModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
- Configure(options =>
+ Configure(options =>
{
options.PublishProviders.Add();
options.NotificationDataMappings
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Jobs/LINGYUN/Abp/Notifications/Jobs/AbpNotificationsJobsModule.cs b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Jobs/LINGYUN/Abp/Notifications/Jobs/AbpNotificationsJobsModule.cs
index c0e7850da..61677cb21 100644
--- a/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Jobs/LINGYUN/Abp/Notifications/Jobs/AbpNotificationsJobsModule.cs
+++ b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Jobs/LINGYUN/Abp/Notifications/Jobs/AbpNotificationsJobsModule.cs
@@ -6,7 +6,7 @@ using Volo.Abp.VirtualFileSystem;
namespace LINGYUN.Abp.Notifications.Jobs;
-[DependsOn(typeof(AbpNotificationModule))]
+[DependsOn(typeof(AbpNotificationsModule))]
[DependsOn(typeof(AbpBackgroundTasksAbstractionsModule))]
public class AbpNotificationsJobsModule : AbpModule
{
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Notifications.SignalR/LINGYUN/Abp/Notifications/SignalR/AbpNotificationsSignalRModule.cs b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.SignalR/LINGYUN/Abp/Notifications/SignalR/AbpNotificationsSignalRModule.cs
index 818677e34..c868fefe7 100644
--- a/aspnet-core/modules/common/LINGYUN.Abp.Notifications.SignalR/LINGYUN/Abp/Notifications/SignalR/AbpNotificationsSignalRModule.cs
+++ b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.SignalR/LINGYUN/Abp/Notifications/SignalR/AbpNotificationsSignalRModule.cs
@@ -4,13 +4,13 @@ using Volo.Abp.Modularity;
namespace LINGYUN.Abp.Notifications.SignalR
{
[DependsOn(
- typeof(AbpNotificationModule),
+ typeof(AbpNotificationsModule),
typeof(AbpAspNetCoreSignalRModule))]
public class AbpNotificationsSignalRModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
- Configure(options =>
+ Configure(options =>
{
options.PublishProviders.Add();
options.NotificationDataMappings
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Sms/LINGYUN/Abp/Notifications/Sms/AbpNotificationsSmsModule.cs b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Sms/LINGYUN/Abp/Notifications/Sms/AbpNotificationsSmsModule.cs
index 4f5f3af8e..9f12489fe 100644
--- a/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Sms/LINGYUN/Abp/Notifications/Sms/AbpNotificationsSmsModule.cs
+++ b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Sms/LINGYUN/Abp/Notifications/Sms/AbpNotificationsSmsModule.cs
@@ -5,7 +5,7 @@ using Volo.Abp.Sms;
namespace LINGYUN.Abp.Notifications.Sms
{
[DependsOn(
- typeof(AbpNotificationModule),
+ typeof(AbpNotificationsModule),
typeof(AbpSmsModule))]
public class AbpNotificationsSmsModule : AbpModule
{
@@ -17,7 +17,7 @@ namespace LINGYUN.Abp.Notifications.Sms
preSmsActions.Configure(options);
});
- Configure(options =>
+ Configure(options =>
{
options.PublishProviders.Add();
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN.Abp.Notifications.csproj b/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN.Abp.Notifications.csproj
index 458d3d23a..0d406ce01 100644
--- a/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN.Abp.Notifications.csproj
+++ b/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN.Abp.Notifications.csproj
@@ -25,6 +25,7 @@
+
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/AbpNotificationOptions.cs b/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/AbpNotificationOptions.cs
deleted file mode 100644
index 097e6f337..000000000
--- a/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/AbpNotificationOptions.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-using System;
-using Volo.Abp.Collections;
-
-namespace LINGYUN.Abp.Notifications
-{
- // TODO: 需要重命名 AbpNotificationsOptions
- public class AbpNotificationOptions
- {
- ///
- /// 自定义通知集合
- ///
- public ITypeList DefinitionProviders { get; }
- ///
- /// 发布者集合
- ///
- public ITypeList PublishProviders { get; }
- ///
- /// 可以自定义某个通知的格式
- ///
- public NotificationDataMappingDictionary NotificationDataMappings { get; }
- ///
- /// 过期时间
- /// 默认60天
- ///
- public TimeSpan ExpirationTime { get; set; }
- public AbpNotificationOptions()
- {
- PublishProviders = new TypeList();
- DefinitionProviders = new TypeList();
- NotificationDataMappings = new NotificationDataMappingDictionary();
-
- ExpirationTime = TimeSpan.FromDays(60);
- }
- }
-}
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/AbpNotificationModule.cs b/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/AbpNotificationsModule.cs
similarity index 52%
rename from aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/AbpNotificationModule.cs
rename to aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/AbpNotificationsModule.cs
index 8f7e43a2e..c603160bd 100644
--- a/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/AbpNotificationModule.cs
+++ b/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/AbpNotificationsModule.cs
@@ -1,9 +1,6 @@
using LINGYUN.Abp.IdGenerator;
using LINGYUN.Abp.Notifications.Localization;
using LINGYUN.Abp.RealTime;
-using Microsoft.Extensions.DependencyInjection;
-using System;
-using System.Collections.Generic;
using Volo.Abp.BackgroundJobs;
using Volo.Abp.BackgroundWorkers;
using Volo.Abp.EventBus;
@@ -18,6 +15,7 @@ namespace LINGYUN.Abp.Notifications
{
// TODO: 需要重命名 AbpNotificationsModule
[DependsOn(
+ typeof(AbpNotificationsCoreModule),
typeof(AbpBackgroundWorkersModule),
typeof(AbpBackgroundJobsAbstractionsModule),
typeof(AbpIdGeneratorModule),
@@ -26,18 +24,13 @@ namespace LINGYUN.Abp.Notifications
typeof(AbpRealTimeModule),
typeof(AbpEventBusModule),
typeof(AbpTextTemplatingCoreModule))]
- public class AbpNotificationModule : AbpModule
+ public class AbpNotificationsModule : AbpModule
{
- public override void PreConfigureServices(ServiceConfigurationContext context)
- {
- AutoAddDefinitionProviders(context.Services);
- }
-
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure(options =>
{
- options.FileSets.AddEmbedded();
+ options.FileSets.AddEmbedded();
});
Configure(options =>
@@ -51,30 +44,6 @@ namespace LINGYUN.Abp.Notifications
{
options.UnsupportedTypes.Add();
});
-
- var preActions = context.Services.GetPreConfigureActions();
- Configure(options =>
- {
- preActions.Configure(options);
- });
- }
-
- private void AutoAddDefinitionProviders(IServiceCollection services)
- {
- var definitionProviders = new List();
-
- services.OnRegistred(context =>
- {
- if (typeof(INotificationDefinitionProvider).IsAssignableFrom(context.ImplementationType))
- {
- definitionProviders.Add(context.ImplementationType);
- }
- });
-
- Configure(options =>
- {
- options.DefinitionProviders.AddIfNotContains(definitionProviders);
- });
}
}
}
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/AbpNotificationsPublishOptions.cs b/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/AbpNotificationsPublishOptions.cs
new file mode 100644
index 000000000..9a14bc0de
--- /dev/null
+++ b/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/AbpNotificationsPublishOptions.cs
@@ -0,0 +1,28 @@
+using System;
+using Volo.Abp.Collections;
+
+namespace LINGYUN.Abp.Notifications;
+
+public class AbpNotificationsPublishOptions
+{
+ ///
+ /// 自定义通知发布提供者集合
+ ///
+ public ITypeList PublishProviders { get; }
+ ///
+ /// 可以自定义某个通知的格式
+ ///
+ public NotificationDataMappingDictionary NotificationDataMappings { get; }
+ ///
+ /// 过期时间
+ /// 默认60天
+ ///
+ public TimeSpan ExpirationTime { get; set; }
+ public AbpNotificationsPublishOptions()
+ {
+ PublishProviders = new TypeList();
+ NotificationDataMappings = new NotificationDataMappingDictionary();
+
+ ExpirationTime = TimeSpan.FromDays(60);
+ }
+}
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/INotificationPublishProvider.cs b/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/INotificationPublishProvider.cs
index 95901fc42..279236098 100644
--- a/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/INotificationPublishProvider.cs
+++ b/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/INotificationPublishProvider.cs
@@ -1,5 +1,4 @@
using System.Collections.Generic;
-using System.Threading;
using System.Threading.Tasks;
namespace LINGYUN.Abp.Notifications
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/Internal/NotificationSender.cs b/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/Internal/NotificationSender.cs
index 4219d1508..e4192a294 100644
--- a/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/Internal/NotificationSender.cs
+++ b/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/Internal/NotificationSender.cs
@@ -40,13 +40,13 @@ namespace LINGYUN.Abp.Notifications
///
protected IUnitOfWorkManager UnitOfWorkManager { get; }
- protected AbpNotificationOptions Options { get; }
+ protected AbpNotificationsPublishOptions Options { get; }
public NotificationSender(
IClock clock,
IDistributedEventBus distributedEventBus,
IDistributedIdGenerator distributedIdGenerator,
IUnitOfWorkManager unitOfWorkManager,
- IOptions options)
+ IOptions options)
{
Clock = clock;
Options = options.Value;
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/NotificationPublishProviderManager.cs b/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/NotificationPublishProviderManager.cs
index 669f3b678..fb18d77a7 100644
--- a/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/NotificationPublishProviderManager.cs
+++ b/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/NotificationPublishProviderManager.cs
@@ -1,5 +1,5 @@
using Microsoft.Extensions.DependencyInjection;
-using Microsoft.Extensions.Options;
+using Microsoft.Extensions.Options;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -11,23 +11,19 @@ namespace LINGYUN.Abp.Notifications
{
public List Providers => _lazyProviders.Value;
- protected AbpNotificationOptions Options { get; }
-
private readonly Lazy> _lazyProviders;
public NotificationPublishProviderManager(
IServiceProvider serviceProvider,
- IOptions options)
- {
- Options = options.Value;
-
- _lazyProviders = new Lazy>(
- () => Options
- .PublishProviders
- .Select(type => serviceProvider.GetRequiredService(type) as INotificationPublishProvider)
- .ToList(),
- true
- );
+ IOptions options)
+ {
+ _lazyProviders = new Lazy>(
+ () => options.Value
+ .PublishProviders
+ .Select(type => serviceProvider.GetRequiredService(type) as INotificationPublishProvider)
+ .ToList(),
+ true
+ );
}
}
}
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Notifications/README.md b/aspnet-core/modules/common/LINGYUN.Abp.Notifications/README.md
index df6076035..dd9a6a67c 100644
--- a/aspnet-core/modules/common/LINGYUN.Abp.Notifications/README.md
+++ b/aspnet-core/modules/common/LINGYUN.Abp.Notifications/README.md
@@ -3,12 +3,6 @@
实时通知基础模块
-#### 注意
-
-* 当前的通知数据模型 NotificationData 设计极度不合理
-
- 将在框架升级为4.0版本之后变更,将与现有通知数据不兼容(这可能就是敏捷开发的避免吧 ;) )
-
## 配置使用
```csharp
diff --git a/aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.Activities.Notifications/LINGYUN/Abp/Elsa/Activities/Notifications/AbpElsaActivitiesNotificationsModule.cs b/aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.Activities.Notifications/LINGYUN/Abp/Elsa/Activities/Notifications/AbpElsaActivitiesNotificationsModule.cs
index 406fe5c27..82b0e528f 100644
--- a/aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.Activities.Notifications/LINGYUN/Abp/Elsa/Activities/Notifications/AbpElsaActivitiesNotificationsModule.cs
+++ b/aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.Activities.Notifications/LINGYUN/Abp/Elsa/Activities/Notifications/AbpElsaActivitiesNotificationsModule.cs
@@ -5,7 +5,7 @@ namespace LINGYUN.Abp.Elsa.Activities.Notifications;
[DependsOn(
typeof(AbpElsaModule),
- typeof(AbpNotificationModule))]
+ typeof(AbpNotificationsModule))]
public class AbpElsaActivitiesNotificationsModule : AbpModule
{
}
diff --git a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/Notifications/NotificationStore.cs b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/Notifications/NotificationStore.cs
index b11e79445..156ec794b 100644
--- a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/Notifications/NotificationStore.cs
+++ b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/Notifications/NotificationStore.cs
@@ -33,7 +33,7 @@ namespace LINGYUN.Abp.MessageService.Notifications
private readonly IUserSubscribeRepository _userSubscribeRepository;
- private readonly AbpNotificationOptions _options;
+ private readonly AbpNotificationsPublishOptions _options;
public NotificationStore(
IClock clock,
@@ -43,7 +43,7 @@ namespace LINGYUN.Abp.MessageService.Notifications
INotificationRepository notificationRepository,
IUserSubscribeRepository userSubscribeRepository,
IUserNotificationRepository userNotificationRepository,
- IOptions options
+ IOptions options
)
{
_clock = clock;
diff --git a/aspnet-core/modules/pushplus/LINGYUN.Abp.Notifications.PushPlus/LINGYUN/Abp/Notifications/PushPlus/AbpNotificationsPushPlusModule.cs b/aspnet-core/modules/pushplus/LINGYUN.Abp.Notifications.PushPlus/LINGYUN/Abp/Notifications/PushPlus/AbpNotificationsPushPlusModule.cs
index 58eb09ec4..6b0568b09 100644
--- a/aspnet-core/modules/pushplus/LINGYUN.Abp.Notifications.PushPlus/LINGYUN/Abp/Notifications/PushPlus/AbpNotificationsPushPlusModule.cs
+++ b/aspnet-core/modules/pushplus/LINGYUN.Abp.Notifications.PushPlus/LINGYUN/Abp/Notifications/PushPlus/AbpNotificationsPushPlusModule.cs
@@ -4,13 +4,13 @@ using Volo.Abp.Modularity;
namespace LINGYUN.Abp.Notifications.PushPlus;
[DependsOn(
- typeof(AbpNotificationModule),
+ typeof(AbpNotificationsModule),
typeof(AbpPushPlusModule))]
public class AbpNotificationsPushPlusModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
- Configure(options =>
+ Configure(options =>
{
options.PublishProviders.Add();
});
diff --git a/aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks.Notifications/LINGYUN/Abp/BackgroundTasks/Notifications/AbpBackgroundTasksNotificationsModule.cs b/aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks.Notifications/LINGYUN/Abp/BackgroundTasks/Notifications/AbpBackgroundTasksNotificationsModule.cs
index 7c2bb61fd..9247ff9f1 100644
--- a/aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks.Notifications/LINGYUN/Abp/BackgroundTasks/Notifications/AbpBackgroundTasksNotificationsModule.cs
+++ b/aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks.Notifications/LINGYUN/Abp/BackgroundTasks/Notifications/AbpBackgroundTasksNotificationsModule.cs
@@ -9,7 +9,7 @@ namespace LINGYUN.Abp.BackgroundTasks.Notifications;
[DependsOn(
typeof(AbpBackgroundTasksActivitiesModule),
- typeof(AbpNotificationModule))]
+ typeof(AbpNotificationsModule))]
public class AbpBackgroundTasksNotificationsModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
diff --git a/aspnet-core/modules/wechat/LINGYUN.Abp.Notifications.WeChat.MiniProgram/LINGYUN/Abp/Notifications/WeChat/MiniProgram/AbpNotificationsWeChatMiniProgramModule.cs b/aspnet-core/modules/wechat/LINGYUN.Abp.Notifications.WeChat.MiniProgram/LINGYUN/Abp/Notifications/WeChat/MiniProgram/AbpNotificationsWeChatMiniProgramModule.cs
index fbf9fd428..0d8f42a77 100644
--- a/aspnet-core/modules/wechat/LINGYUN.Abp.Notifications.WeChat.MiniProgram/LINGYUN/Abp/Notifications/WeChat/MiniProgram/AbpNotificationsWeChatMiniProgramModule.cs
+++ b/aspnet-core/modules/wechat/LINGYUN.Abp.Notifications.WeChat.MiniProgram/LINGYUN/Abp/Notifications/WeChat/MiniProgram/AbpNotificationsWeChatMiniProgramModule.cs
@@ -6,7 +6,7 @@ namespace LINGYUN.Abp.Notifications.WeChat.MiniProgram
{
[DependsOn(
typeof(AbpWeChatMiniProgramModule),
- typeof(AbpNotificationModule))]
+ typeof(AbpNotificationsModule))]
public class AbpNotificationsWeChatMiniProgramModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
@@ -18,7 +18,7 @@ namespace LINGYUN.Abp.Notifications.WeChat.MiniProgram
preActions.Configure(options);
});
- Configure(options =>
+ Configure(options =>
{
options.PublishProviders.Add();
diff --git a/aspnet-core/modules/wx-pusher/LINGYUN.Abp.Notifications.WxPusher/LINGYUN/Abp/Notifications/WxPusher/AbpNotificationsWxPusherModule.cs b/aspnet-core/modules/wx-pusher/LINGYUN.Abp.Notifications.WxPusher/LINGYUN/Abp/Notifications/WxPusher/AbpNotificationsWxPusherModule.cs
index 9e6f57366..087143e54 100644
--- a/aspnet-core/modules/wx-pusher/LINGYUN.Abp.Notifications.WxPusher/LINGYUN/Abp/Notifications/WxPusher/AbpNotificationsWxPusherModule.cs
+++ b/aspnet-core/modules/wx-pusher/LINGYUN.Abp.Notifications.WxPusher/LINGYUN/Abp/Notifications/WxPusher/AbpNotificationsWxPusherModule.cs
@@ -4,13 +4,13 @@ using Volo.Abp.Modularity;
namespace LINGYUN.Abp.Notifications.WxPusher;
[DependsOn(
- typeof(AbpNotificationModule),
+ typeof(AbpNotificationsModule),
typeof(AbpWxPusherModule))]
public class AbpNotificationsWxPusherModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
- Configure(options =>
+ Configure(options =>
{
options.PublishProviders.Add();
});
diff --git a/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/PlatformManagementHttpApiHostModule.cs b/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/PlatformManagementHttpApiHostModule.cs
index 61c538e8f..07681a93a 100644
--- a/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/PlatformManagementHttpApiHostModule.cs
+++ b/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/PlatformManagementHttpApiHostModule.cs
@@ -70,7 +70,7 @@ namespace LY.MicroService.PlatformManagement;
typeof(AbpDataDbMigratorModule),
typeof(AbpAspNetCoreAuthenticationJwtBearerModule),
typeof(AbpAuthorizationOrganizationUnitsModule),
- typeof(AbpNotificationModule),
+ typeof(AbpNotificationsModule),
typeof(AbpEmailingExceptionHandlingModule),
typeof(AbpCAPEventBusModule),
typeof(AbpFeaturesValidationRedisModule),
diff --git a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/BackgroundJobs/NotificationPublishJob.cs b/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/BackgroundJobs/NotificationPublishJob.cs
index 081a85d33..8ade06248 100644
--- a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/BackgroundJobs/NotificationPublishJob.cs
+++ b/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/BackgroundJobs/NotificationPublishJob.cs
@@ -10,11 +10,11 @@ namespace LY.MicroService.RealtimeMessage.BackgroundJobs;
public class NotificationPublishJob : AsyncBackgroundJob, ITransientDependency
{
- protected AbpNotificationOptions Options { get; }
+ protected AbpNotificationsPublishOptions Options { get; }
protected IServiceScopeFactory ServiceScopeFactory { get; }
public NotificationPublishJob(
- IOptions options,
+ IOptions options,
IServiceScopeFactory serviceScopeFactory)
{
Options = options.Value;
diff --git a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/EventBus/Distributed/NotificationEventHandler.cs b/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/EventBus/Distributed/NotificationEventHandler.cs
index 5df5c58d0..45cc7e7fa 100644
--- a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/EventBus/Distributed/NotificationEventHandler.cs
+++ b/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/EventBus/Distributed/NotificationEventHandler.cs
@@ -35,9 +35,9 @@ namespace LY.MicroService.RealtimeMessage.EventBus.Distributed
///
public ILogger Logger { get; set; }
///
- /// Reference to .
+ /// Reference to .
///
- protected AbpNotificationOptions Options { get; }
+ protected AbpNotificationsPublishOptions Options { get; }
///
/// Reference to .
///
@@ -84,7 +84,7 @@ namespace LY.MicroService.RealtimeMessage.EventBus.Distributed
ITemplateRenderer templateRenderer,
IBackgroundJobManager backgroundJobManager,
IStringLocalizerFactory stringLocalizerFactory,
- IOptions options,
+ IOptions options,
INotificationStore notificationStore,
INotificationDefinitionManager notificationDefinitionManager,
INotificationSubscriptionManager notificationSubscriptionManager,
diff --git a/aspnet-core/tests/LINGYUN.Abp.Notifications.Tests/LINGYUN/Abp/Notifications/AbpNotificationsTestsModule.cs b/aspnet-core/tests/LINGYUN.Abp.Notifications.Tests/LINGYUN/Abp/Notifications/AbpNotificationsTestsModule.cs
index 4e8bab37b..4b519cc2b 100644
--- a/aspnet-core/tests/LINGYUN.Abp.Notifications.Tests/LINGYUN/Abp/Notifications/AbpNotificationsTestsModule.cs
+++ b/aspnet-core/tests/LINGYUN.Abp.Notifications.Tests/LINGYUN/Abp/Notifications/AbpNotificationsTestsModule.cs
@@ -4,7 +4,7 @@ using Volo.Abp.Modularity;
namespace LINGYUN.Abp.Notifications
{
[DependsOn(
- typeof(AbpNotificationModule),
+ typeof(AbpNotificationsModule),
typeof(AbpTestsBaseModule))]
public class AbpNotificationsTestsModule : AbpModule
{
diff --git a/aspnet-core/tests/LINGYUN.Abp.Notifications.Tests/LINGYUN/Abp/Notifications/FakeNotificationSender.cs b/aspnet-core/tests/LINGYUN.Abp.Notifications.Tests/LINGYUN/Abp/Notifications/FakeNotificationSender.cs
index 5175ae528..ec5aee1b2 100644
--- a/aspnet-core/tests/LINGYUN.Abp.Notifications.Tests/LINGYUN/Abp/Notifications/FakeNotificationSender.cs
+++ b/aspnet-core/tests/LINGYUN.Abp.Notifications.Tests/LINGYUN/Abp/Notifications/FakeNotificationSender.cs
@@ -17,7 +17,7 @@ public class FakeNotificationSender : INotificationSender, ITransientDependency
{
public ILogger Logger { get; set; }
- protected AbpNotificationOptions Options { get; }
+ protected AbpNotificationsPublishOptions Options { get; }
protected IJsonSerializer JsonSerializer { get; }
@@ -37,7 +37,7 @@ public class FakeNotificationSender : INotificationSender, ITransientDependency
IJsonSerializer jsonSerializer,
ITemplateRenderer templateRenderer,
IStringLocalizerFactory stringLocalizerFactory,
- IOptions options,
+ IOptions options,
INotificationStore notificationStore,
INotificationDefinitionManager notificationDefinitionManager,
INotificationSubscriptionManager notificationSubscriptionManager,
diff --git a/aspnet-core/tests/LINGYUN.Abp.Notifications.Tests/LINGYUN/Abp/Notifications/NotificationsTestsDefinitionProvider_Tests.cs b/aspnet-core/tests/LINGYUN.Abp.Notifications.Tests/LINGYUN/Abp/Notifications/NotificationsTestsDefinitionProvider_Tests.cs
index 5df9a913e..01acb0ccc 100644
--- a/aspnet-core/tests/LINGYUN.Abp.Notifications.Tests/LINGYUN/Abp/Notifications/NotificationsTestsDefinitionProvider_Tests.cs
+++ b/aspnet-core/tests/LINGYUN.Abp.Notifications.Tests/LINGYUN/Abp/Notifications/NotificationsTestsDefinitionProvider_Tests.cs
@@ -17,14 +17,14 @@ namespace LINGYUN.Abp.Notifications
public void GetGroups_Test()
{
var groups = NotificationDefinitionManager.GetGroups();
- groups.Count.ShouldBe(1);
+ groups.Count.ShouldBe(2);
}
[Fact]
public void GetAll_Test()
{
var notifications = NotificationDefinitionManager.GetAll();
- notifications.Count.ShouldBe(3);
+ notifications.Count.ShouldBe(6);
}
[Fact]
diff --git a/aspnet-core/tests/LINGYUN.Abp.Notifications.WeChat.MiniProgram.Tests/LINGYUN/Abp/Notifications/WeChat/MiniProgram/AbpNotificationsWeChatMiniProgramTestsModule.cs b/aspnet-core/tests/LINGYUN.Abp.Notifications.WeChat.MiniProgram.Tests/LINGYUN/Abp/Notifications/WeChat/MiniProgram/AbpNotificationsWeChatMiniProgramTestsModule.cs
index c0646ac8a..ecdf9aa37 100644
--- a/aspnet-core/tests/LINGYUN.Abp.Notifications.WeChat.MiniProgram.Tests/LINGYUN/Abp/Notifications/WeChat/MiniProgram/AbpNotificationsWeChatMiniProgramTestsModule.cs
+++ b/aspnet-core/tests/LINGYUN.Abp.Notifications.WeChat.MiniProgram.Tests/LINGYUN/Abp/Notifications/WeChat/MiniProgram/AbpNotificationsWeChatMiniProgramTestsModule.cs
@@ -20,7 +20,7 @@ namespace LINGYUN.Abp.Notifications.WeChat.MiniProgram
public override void ConfigureServices(ServiceConfigurationContext context)
{
// Զݴ
- Configure(options =>
+ Configure(options =>
{
// ֪ͨر֪ͨ
options.NotificationDataMappings
diff --git a/aspnet-core/tests/LINGYUN.Abp.Notifications.WeChat.MiniProgram.Tests/LINGYUN/Abp/Notifications/WeChat/WeChatMiniProgramNotificationDataMapping_Tests.cs b/aspnet-core/tests/LINGYUN.Abp.Notifications.WeChat.MiniProgram.Tests/LINGYUN/Abp/Notifications/WeChat/WeChatMiniProgramNotificationDataMapping_Tests.cs
index 7f0356ba6..cfc7f8658 100644
--- a/aspnet-core/tests/LINGYUN.Abp.Notifications.WeChat.MiniProgram.Tests/LINGYUN/Abp/Notifications/WeChat/WeChatMiniProgramNotificationDataMapping_Tests.cs
+++ b/aspnet-core/tests/LINGYUN.Abp.Notifications.WeChat.MiniProgram.Tests/LINGYUN/Abp/Notifications/WeChat/WeChatMiniProgramNotificationDataMapping_Tests.cs
@@ -8,11 +8,11 @@ namespace LINGYUN.Abp.Notifications.WeChat.MiniProgram
public class WeChatMiniProgramNotificationDataMapping_Tests : AbpNotificationsWeChatMiniProgramTestsBase
{
private readonly NotificationData _notificationData;
- protected AbpNotificationOptions NotificationOptions { get; }
+ protected AbpNotificationsPublishOptions NotificationsPublishOptions { get; }
protected AbpNotificationsWeChatMiniProgramOptions NotificationWeChatMiniProgramOptions { get; }
public WeChatMiniProgramNotificationDataMapping_Tests()
{
- NotificationOptions = GetRequiredService>().Value;
+ NotificationsPublishOptions = GetRequiredService>().Value;
NotificationWeChatMiniProgramOptions = GetRequiredService>().Value;
_notificationData = new NotificationData();
@@ -30,7 +30,7 @@ namespace LINGYUN.Abp.Notifications.WeChat.MiniProgram
[Fact]
public void Mapping_WeChatMiniProgram_Notification_Data_Test()
{
- var mappingOpenIdItem = NotificationOptions
+ var mappingOpenIdItem = NotificationsPublishOptions
.NotificationDataMappings
.GetMapItemOrDefault(WeChatMiniProgramNotificationPublishProvider.ProviderName, NotificationsTestsNames.Test1);
@@ -47,7 +47,7 @@ namespace LINGYUN.Abp.Notifications.WeChat.MiniProgram
[Fact]
public void Mapping_Standard_Notification_Data_Test()
{
- var mappingStandardItem = NotificationOptions
+ var mappingStandardItem = NotificationsPublishOptions
.NotificationDataMappings
.GetMapItemOrDefault(WeChatMiniProgramNotificationPublishProvider.ProviderName, NotificationsTestsNames.Test2);
@@ -62,7 +62,7 @@ namespace LINGYUN.Abp.Notifications.WeChat.MiniProgram
[Fact]
public void Mapping_Origin_Notification_Data_Test()
{
- var mappingOriginItem = NotificationOptions
+ var mappingOriginItem = NotificationsPublishOptions
.NotificationDataMappings
.GetMapItemOrDefault(WeChatMiniProgramNotificationPublishProvider.ProviderName, NotificationsTestsNames.Test3);