From 400240a2788a7e159b999ffc877e85278953b492 Mon Sep 17 00:00:00 2001
From: cKey <35512826+colinin@users.noreply.github.com>
Date: Mon, 29 Aug 2022 20:05:51 +0800
Subject: [PATCH] abstract notification core module
---
.../LINGYUN.Abp.Notifications.Core.csproj | 7 ++++++-
.../Notifications/AbpNotificationsCoreModule.cs | 15 +++++++++++++--
.../Localization/NotificationsResource.cs | 0
.../LINGYUN/Abp/Notifications/NotificationData.cs | 0
.../LINGYUN/Abp/Notifications/NotificationEto.cs | 0
.../Abp/Notifications/NotificationEventData.cs | 0
.../LINGYUN/Abp/Notifications/NotificationInfo.cs | 0
.../Notifications/NotificationSubscriptionInfo.cs | 0
.../Abp/Notifications/NotificationTemplate.cs | 0
.../LINGYUN/Abp/Notifications/UserIdentifier.cs | 0
.../Abp/Notifications/AbpNotificationsModule.cs | 2 +-
11 files changed, 20 insertions(+), 4 deletions(-)
rename aspnet-core/modules/common/{LINGYUN.Abp.Notifications => LINGYUN.Abp.Notifications.Core}/LINGYUN/Abp/Notifications/Localization/NotificationsResource.cs (100%)
rename aspnet-core/modules/common/{LINGYUN.Abp.Notifications => LINGYUN.Abp.Notifications.Core}/LINGYUN/Abp/Notifications/NotificationData.cs (100%)
rename aspnet-core/modules/common/{LINGYUN.Abp.Notifications => LINGYUN.Abp.Notifications.Core}/LINGYUN/Abp/Notifications/NotificationEto.cs (100%)
rename aspnet-core/modules/common/{LINGYUN.Abp.Notifications => LINGYUN.Abp.Notifications.Core}/LINGYUN/Abp/Notifications/NotificationEventData.cs (100%)
rename aspnet-core/modules/common/{LINGYUN.Abp.Notifications => LINGYUN.Abp.Notifications.Core}/LINGYUN/Abp/Notifications/NotificationInfo.cs (100%)
rename aspnet-core/modules/common/{LINGYUN.Abp.Notifications => LINGYUN.Abp.Notifications.Core}/LINGYUN/Abp/Notifications/NotificationSubscriptionInfo.cs (100%)
rename aspnet-core/modules/common/{LINGYUN.Abp.Notifications => LINGYUN.Abp.Notifications.Core}/LINGYUN/Abp/Notifications/NotificationTemplate.cs (100%)
rename aspnet-core/modules/common/{LINGYUN.Abp.Notifications => LINGYUN.Abp.Notifications.Core}/LINGYUN/Abp/Notifications/UserIdentifier.cs (100%)
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
index 8ec720e7d..2ef55c741 100644
--- 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
@@ -9,8 +9,13 @@
-
+
+
+
+
+
+
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
index ba03e444b..3ebff9b68 100644
--- 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
@@ -1,13 +1,19 @@
-using Microsoft.Extensions.DependencyInjection;
+using LINGYUN.Abp.Notifications.Localization;
+using LINGYUN.Abp.RealTime;
+using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
+using Volo.Abp.EventBus.Abstractions;
+using Volo.Abp.Localization;
using Volo.Abp.Modularity;
using Volo.Abp.TextTemplating;
namespace LINGYUN.Abp.Notifications;
[DependsOn(
- typeof(AbpTextTemplatingCoreModule))]
+ typeof(AbpTextTemplatingCoreModule),
+ typeof(AbpRealTimeModule),
+ typeof(AbpEventBusAbstractionsModule))]
public class AbpNotificationsCoreModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)
@@ -17,6 +23,11 @@ public class AbpNotificationsCoreModule : AbpModule
public override void ConfigureServices(ServiceConfigurationContext context)
{
+ Configure(options =>
+ {
+ options.Resources.Add();
+ });
+
var preActions = context.Services.GetPreConfigureActions();
Configure(options =>
{
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/Localization/NotificationsResource.cs b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/Localization/NotificationsResource.cs
similarity index 100%
rename from aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/Localization/NotificationsResource.cs
rename to aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/Localization/NotificationsResource.cs
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/NotificationData.cs b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/NotificationData.cs
similarity index 100%
rename from aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/NotificationData.cs
rename to aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/NotificationData.cs
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/NotificationEto.cs b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/NotificationEto.cs
similarity index 100%
rename from aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/NotificationEto.cs
rename to aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/NotificationEto.cs
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/NotificationEventData.cs b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/NotificationEventData.cs
similarity index 100%
rename from aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/NotificationEventData.cs
rename to aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/NotificationEventData.cs
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/NotificationInfo.cs b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/NotificationInfo.cs
similarity index 100%
rename from aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/NotificationInfo.cs
rename to aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/NotificationInfo.cs
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/NotificationSubscriptionInfo.cs b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/NotificationSubscriptionInfo.cs
similarity index 100%
rename from aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/NotificationSubscriptionInfo.cs
rename to aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/NotificationSubscriptionInfo.cs
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/NotificationTemplate.cs b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/NotificationTemplate.cs
similarity index 100%
rename from aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/NotificationTemplate.cs
rename to aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/NotificationTemplate.cs
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/UserIdentifier.cs b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/UserIdentifier.cs
similarity index 100%
rename from aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/UserIdentifier.cs
rename to aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/UserIdentifier.cs
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/AbpNotificationsModule.cs b/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/AbpNotificationsModule.cs
index c603160bd..c724ed22d 100644
--- a/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/AbpNotificationsModule.cs
+++ b/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/AbpNotificationsModule.cs
@@ -36,7 +36,7 @@ namespace LINGYUN.Abp.Notifications
Configure(options =>
{
options.Resources
- .Add("en")
+ .Get()
.AddVirtualJson("/LINGYUN/Abp/Notifications/Localization/Resources");
});