diff --git a/RC/RC.ConfigClient/RC.ConfileClient.ConsoleDemo/RC.ConfileClient.ConsoleDemo.csproj b/RC/RC.ConfigClient/RC.ConfileClient.ConsoleDemo/RC.ConfileClient.ConsoleDemo.csproj index 933a584b5..0412ad380 100644 --- a/RC/RC.ConfigClient/RC.ConfileClient.ConsoleDemo/RC.ConfileClient.ConsoleDemo.csproj +++ b/RC/RC.ConfigClient/RC.ConfileClient.ConsoleDemo/RC.ConfileClient.ConsoleDemo.csproj @@ -1,7 +1,7 @@  Exe - net6.0;net8.0 + net8.0;net9.0 false diff --git a/RC/RC.Deploy/RC.Deploy.WebAPI/RC.Deploy.WebAPI.csproj b/RC/RC.Deploy/RC.Deploy.WebAPI/RC.Deploy.WebAPI.csproj index 91dec2796..58380b312 100644 --- a/RC/RC.Deploy/RC.Deploy.WebAPI/RC.Deploy.WebAPI.csproj +++ b/RC/RC.Deploy/RC.Deploy.WebAPI/RC.Deploy.WebAPI.csproj @@ -4,7 +4,6 @@ false - @@ -24,7 +23,4 @@ - - - \ No newline at end of file diff --git a/RC/RC.EnvironmentServer/RC.EnvironmentServer.Application/EventHandlers/NamespaceDeleteEventHandler.cs b/RC/RC.EnvironmentServer/RC.EnvironmentServer.Application/EventHandlers/NamespaceDeleteEventHandler.cs index 8e61b2b0a..0f4dfb8dc 100644 --- a/RC/RC.EnvironmentServer/RC.EnvironmentServer.Application/EventHandlers/NamespaceDeleteEventHandler.cs +++ b/RC/RC.EnvironmentServer/RC.EnvironmentServer.Application/EventHandlers/NamespaceDeleteEventHandler.cs @@ -6,7 +6,7 @@ namespace RC.EnvironmentServer.Application.EventHandlers /// /// 命名空间删除事件处理器 /// - public class NamespaceDeleteEventHandler(IOptionsMonitor applicationConfig, IOptionsMonitor eventBusConfig, IEnvironmentServerUnitOfWork unitOfWork, IConfigurationItemRepository configurationItemRepository) : RCEnvironmentServerEventHandler(applicationConfig, eventBusConfig) + public class NamespaceDeleteEventHandler(IOptionsMonitor applicationConfig, IOptionsMonitor eventBusConfig, IEnvironmentServerUnitOfWork unitOfWork, IConfigurationItemRepository configurationItemRepository) : RCEnvironmentServerEventHandler(applicationConfig, eventBusConfig) { /// /// 处理 diff --git a/RC/RC.EnvironmentServer/RC.EnvironmentServer.Application/EventHandlers/ProjectDeleteEventHandler.cs b/RC/RC.EnvironmentServer/RC.EnvironmentServer.Application/EventHandlers/ProjectDeleteEventHandler.cs index 1b6febd93..f2a3cd051 100644 --- a/RC/RC.EnvironmentServer/RC.EnvironmentServer.Application/EventHandlers/ProjectDeleteEventHandler.cs +++ b/RC/RC.EnvironmentServer/RC.EnvironmentServer.Application/EventHandlers/ProjectDeleteEventHandler.cs @@ -6,7 +6,7 @@ namespace RC.EnvironmentServer.Application.EventHandlers /// /// 项目删除事件处理器 /// - public class ProjectDeleteEventHandler(IOptionsMonitor applicationConfig, IOptionsMonitor eventBusConfig, IEnvironmentServerUnitOfWork unitOfWork, IConfigurationItemRepository configurationItemRepository) : RCEnvironmentServerEventHandler(applicationConfig, eventBusConfig) + public class ProjectDeleteEventHandler(IOptionsMonitor applicationConfig, IOptionsMonitor eventBusConfig, IEnvironmentServerUnitOfWork unitOfWork, IConfigurationItemRepository configurationItemRepository) : RCEnvironmentServerEventHandler(applicationConfig, eventBusConfig) { /// /// 处理 diff --git a/RC/RC.EnvironmentServer/RC.EnvironmentServer.Application/EventHandlers/RCEnvironmentServerEventHandler.cs b/RC/RC.EnvironmentServer/RC.EnvironmentServer.Application/EventHandlers/RCEnvironmentServerEventHandler.cs index a85cc4aab..551ef1bdb 100644 --- a/RC/RC.EnvironmentServer/RC.EnvironmentServer.Application/EventHandlers/RCEnvironmentServerEventHandler.cs +++ b/RC/RC.EnvironmentServer/RC.EnvironmentServer.Application/EventHandlers/RCEnvironmentServerEventHandler.cs @@ -8,7 +8,7 @@ namespace RC.EnvironmentServer.Application.EventHandlers /// /// [QueueName("RCEnvironmentServer")] - public abstract class RCEnvironmentServerEventHandler(IOptionsMonitor applicationConfig, IOptionsMonitor eventBusConfig) : BaseEventHandler, IEventHandler, IRabbitMQEventHandler + public abstract class RCEnvironmentServerEventHandler(IOptionsMonitor applicationConfig, IOptionsMonitor eventBusConfig) : BaseEventHandler, IEventHandler, IRabbitMQEventHandler where TEvent : IEvent { /// @@ -18,6 +18,6 @@ public abstract class RCEnvironmentServerEventHandler(IOptionsMonitor /// 队列名称 /// - public string? QueueName => $"{AppConfig.CurrentValue.ServiceName}Queue{eventBusConfig.CurrentValue.NameSuffix}"; + public string QueueName => $"{AppConfig.CurrentValue.ServiceName}Queue{eventBusConfig.CurrentValue.NameSuffix}"; } } diff --git a/RC/RC.EnvironmentServer/RC.EnvironmentServer.Application/EventHandlers/SyncConfigEventHandler.cs b/RC/RC.EnvironmentServer/RC.EnvironmentServer.Application/EventHandlers/SyncConfigEventHandler.cs index f5d0a20bf..244eaddf3 100644 --- a/RC/RC.EnvironmentServer/RC.EnvironmentServer.Application/EventHandlers/SyncConfigEventHandler.cs +++ b/RC/RC.EnvironmentServer/RC.EnvironmentServer.Application/EventHandlers/SyncConfigEventHandler.cs @@ -8,7 +8,7 @@ namespace RC.EnvironmentServer.Application.EventHandlers /// /// 同步配置事件处理器 /// - public class SyncConfigEventHandler(IOptionsMonitor applicationConfig, IOptionsMonitor eventBusConfig, IMapper mapper, IEnvironmentServerUnitOfWork unitOfWork, IConfigurationItemRepository configurationItemRepository) : RCEnvironmentServerEventHandler(applicationConfig, eventBusConfig) + public class SyncConfigEventHandler(IOptionsMonitor applicationConfig, IOptionsMonitor eventBusConfig, IMapper mapper, IEnvironmentServerUnitOfWork unitOfWork, IConfigurationItemRepository configurationItemRepository) : RCEnvironmentServerEventHandler(applicationConfig, eventBusConfig) { private static readonly object _syncLockObj = new(); /// diff --git a/RC/RC.EnvironmentServer/RC.EnvironmentServer.Application/Services/ConfigurationItemServiceImpl.cs b/RC/RC.EnvironmentServer/RC.EnvironmentServer.Application/Services/ConfigurationItemServiceImpl.cs index 84a40293a..59903e4d9 100644 --- a/RC/RC.EnvironmentServer/RC.EnvironmentServer.Application/Services/ConfigurationItemServiceImpl.cs +++ b/RC/RC.EnvironmentServer/RC.EnvironmentServer.Application/Services/ConfigurationItemServiceImpl.cs @@ -127,7 +127,7 @@ public async Task SyncConfigAsync(SyncConfigModel model) TargetEnvironments = model.TargetEnvironments, ConfigurationItems = Mapper.Map>(configurationItems) ?? throw new RCException("映射失败") }; - eventBus.Publish(@event); + await eventBus.PublishAsync(@event); } } } diff --git a/RC/RC.EnvironmentServer/RC.EnvironmentServer.WebAPI/RC.EnvironmentServer.WebAPI.csproj b/RC/RC.EnvironmentServer/RC.EnvironmentServer.WebAPI/RC.EnvironmentServer.WebAPI.csproj index 7f984aecb..32cb6f048 100644 --- a/RC/RC.EnvironmentServer/RC.EnvironmentServer.WebAPI/RC.EnvironmentServer.WebAPI.csproj +++ b/RC/RC.EnvironmentServer/RC.EnvironmentServer.WebAPI/RC.EnvironmentServer.WebAPI.csproj @@ -4,7 +4,6 @@ false - @@ -24,7 +23,4 @@ - - - \ No newline at end of file diff --git a/RC/RC.ServerCenter/RC.ServerCenter.Application/Services/NamespaceServiceImpl.cs b/RC/RC.ServerCenter/RC.ServerCenter.Application/Services/NamespaceServiceImpl.cs index aeebb4ffc..42addf8de 100644 --- a/RC/RC.ServerCenter/RC.ServerCenter.Application/Services/NamespaceServiceImpl.cs +++ b/RC/RC.ServerCenter/RC.ServerCenter.Application/Services/NamespaceServiceImpl.cs @@ -28,7 +28,7 @@ public override async Task AddAsync(AddNamespaceModel model) protected override async Task DeleteAsync(Namespace domain) { await base.DeleteAsync(domain); - eventBus.Publish(new NamespaceDeleteEvent + await eventBus.PublishAsync(new NamespaceDeleteEvent { NamespaceID = domain.ID }); diff --git a/RC/RC.ServerCenter/RC.ServerCenter.Application/Services/ProjectServiceImpl.cs b/RC/RC.ServerCenter/RC.ServerCenter.Application/Services/ProjectServiceImpl.cs index 0e46cdf8a..59cbfd37f 100644 --- a/RC/RC.ServerCenter/RC.ServerCenter.Application/Services/ProjectServiceImpl.cs +++ b/RC/RC.ServerCenter/RC.ServerCenter.Application/Services/ProjectServiceImpl.cs @@ -51,7 +51,7 @@ protected override async Task DeleteAsync(Project domain) UnitOfWork.RegisterDelete(@namespace); } await base.DeleteAsync(domain); - eventBus.Publish(new ProjectDeleteEvent + await eventBus.PublishAsync(new ProjectDeleteEvent { ProjectID = domain.ID }); diff --git a/RC/RC.ServerCenter/RC.ServerCenter.WebAPI/RC.ServerCenter.WebAPI.csproj b/RC/RC.ServerCenter/RC.ServerCenter.WebAPI/RC.ServerCenter.WebAPI.csproj index 9e7de51f8..9eac3f8fb 100644 --- a/RC/RC.ServerCenter/RC.ServerCenter.WebAPI/RC.ServerCenter.WebAPI.csproj +++ b/RC/RC.ServerCenter/RC.ServerCenter.WebAPI/RC.ServerCenter.WebAPI.csproj @@ -4,7 +4,6 @@ false - @@ -24,7 +23,4 @@ - - - \ No newline at end of file diff --git a/RC/RC.WebAPI/Properties/PublishProfiles/FolderProfile.pubxml b/RC/RC.WebAPI/Properties/PublishProfiles/FolderProfile.pubxml index 6998752f3..287f23f5a 100644 --- a/RC/RC.WebAPI/Properties/PublishProfiles/FolderProfile.pubxml +++ b/RC/RC.WebAPI/Properties/PublishProfiles/FolderProfile.pubxml @@ -14,7 +14,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. FileSystem <_TargetId>Folder - net8.0-windows + net9.0-windows 5311c3e4-5e07-4283-9580-8da332c98d2e false diff --git a/RC/publish.ps1 b/RC/publish.ps1 index 3c896d851..f313006c9 100644 --- a/RC/publish.ps1 +++ b/RC/publish.ps1 @@ -28,5 +28,5 @@ foreach ($subfolder in $allSubfolders) { } } } -Write-Host "鍙戝竷瀹屾瘯 $publishDirPath" +Write-Host "发布完成 $publishDirPath" explorer("$publishDirPath") \ No newline at end of file