From 82eab0104c8445e8f066f09c927c0152d89ead77 Mon Sep 17 00:00:00 2001 From: root <295172551@qq.com> Date: Wed, 13 Aug 2025 22:59:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9E=B6=E6=9E=84=E5=BC=95?= =?UTF-8?q?=E7=94=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- X1.sln | 10 ++++++ src/X1.Application/DependencyInjection.cs | 11 +----- .../StartDeviceRuntimeCommandHandler.cs | 4 +-- .../StopDeviceRuntimeCommandHandler.cs | 5 ++- .../CreateDeviceCommandHandler.cs | 5 ++- .../CreateTerminalDeviceCommandHandler.cs | 5 ++- src/X1.Application/X1.Application.csproj | 1 - .../DeviceManagementService.cs | 6 ++-- .../IServiceScopeExecutor.cs | 4 +-- .../BackendServiceManager/OperationResult.cs | 4 +-- .../ProtocolChannelManager.cs | 4 +-- .../ServiceScopeExecutor.cs | 4 +-- src/X1.BackendServices/DependencyInjection.cs | 27 +++++++++++++++ .../X1.BackendServices.csproj | 20 +++++++++++ .../IBaseInstrumentClient.cs | 4 +-- .../IInstrumentHttpClient.cs | 3 +- .../IInstrumentProtocolClient.cs | 4 +-- .../IServiceEndpointManager.cs | 4 +-- .../Models/ApiActionResult.cs | 2 +- .../Models/CellularNetworkConfiguration.cs | 2 +- .../Models/CellularNetworkRequest.cs | 2 +- .../Models/CircuitBreakerOptions.cs | 2 +- .../Models/DeviceInfoResponse.cs | 2 +- .../Models/DynamicHttpClientException.cs | 2 +- .../Models/HttpRequestOptions.cs | 2 +- .../Models/ServiceEndpoint.cs | 2 +- .../Options}/AuthConfiguration.cs | 17 ++++++++-- src/X1.Domain/X1.Domain.csproj | 6 ++-- .../Core/DynamicHttpClient.Core.cs | 2 +- .../Core/DynamicHttpClient.Sync.cs | 2 +- .../Core/DynamicHttpClient.SyncCore.cs | 2 +- .../Core/DynamicHttpClient.cs | 3 +- .../Extensions/ServiceCollectionExtensions.cs | 10 +++--- .../DynamicHttpClient.FileDownload.cs | 2 +- .../DynamicHttpClient.FileInfo.cs | 2 +- .../DynamicHttpClient.FileUpload.cs | 2 +- .../Infrastructure/CircuitBreakerManager.cs | 2 +- .../Infrastructure/ServiceEndpointManager.cs | 3 +- .../Interfaces/IAsyncHttpClient.cs | 2 +- .../Interfaces/ICircuitBreakerManager.cs | 2 +- .../Interfaces/IDynamicHttpClient.cs | 2 +- .../Interfaces/IFileHttpClient.cs | 3 +- .../Interfaces/IHttpClientBase.cs | 2 +- .../Interfaces/ISyncHttpClient.cs | 2 +- .../Service/InstrumentProtocolClient.cs | 6 ++-- .../X1.DynamicClientCore.csproj | 12 ++++--- .../Controllers/AuthController.cs | 2 +- src/X1.Presentation/X1.Presentation.csproj | 1 - src/X1.WebAPI/Program.cs | 6 +++- src/X1.WebAPI/X1.WebAPI.csproj | 1 + src/modify.md | 34 ++++++++++++++++++- 51 files changed, 186 insertions(+), 83 deletions(-) rename src/{X1.Application => X1.BackendServices}/BackendServiceManager/DeviceManagementService.cs (98%) rename src/{X1.Application => X1.BackendServices}/BackendServiceManager/IServiceScopeExecutor.cs (95%) rename src/{X1.Application => X1.BackendServices}/BackendServiceManager/OperationResult.cs (98%) rename src/{X1.Application => X1.BackendServices}/BackendServiceManager/ProtocolChannelManager.cs (99%) rename src/{X1.Application => X1.BackendServices}/BackendServiceManager/ServiceScopeExecutor.cs (99%) create mode 100644 src/X1.BackendServices/DependencyInjection.cs create mode 100644 src/X1.BackendServices/X1.BackendServices.csproj rename src/{X1.DynamicClientCore/Features => X1.Domain/ExternalCommunication}/IBaseInstrumentClient.cs (93%) rename src/{X1.DynamicClientCore/Features => X1.Domain/ExternalCommunication}/IInstrumentHttpClient.cs (93%) rename src/{X1.DynamicClientCore/Features => X1.Domain/ExternalCommunication}/IInstrumentProtocolClient.cs (96%) rename src/{X1.DynamicClientCore/Interfaces => X1.Domain/ExternalCommunication}/IServiceEndpointManager.cs (94%) rename src/{X1.DynamicClientCore => X1.Domain/ExternalCommunication}/Models/ApiActionResult.cs (98%) rename src/{X1.DynamicClientCore => X1.Domain/ExternalCommunication}/Models/CellularNetworkConfiguration.cs (97%) rename src/{X1.DynamicClientCore => X1.Domain/ExternalCommunication}/Models/CellularNetworkRequest.cs (92%) rename src/{X1.DynamicClientCore => X1.Domain/ExternalCommunication}/Models/CircuitBreakerOptions.cs (98%) rename src/{X1.DynamicClientCore => X1.Domain/ExternalCommunication}/Models/DeviceInfoResponse.cs (91%) rename src/{X1.DynamicClientCore => X1.Domain/ExternalCommunication}/Models/DynamicHttpClientException.cs (98%) rename src/{X1.DynamicClientCore => X1.Domain/ExternalCommunication}/Models/HttpRequestOptions.cs (96%) rename src/{X1.DynamicClientCore => X1.Domain/ExternalCommunication}/Models/ServiceEndpoint.cs (97%) rename src/{X1.Infrastructure/Configurations/Identity => X1.Domain/Options}/AuthConfiguration.cs (69%) rename src/X1.DynamicClientCore/{Features => }/Service/InstrumentProtocolClient.cs (98%) diff --git a/X1.sln b/X1.sln index fd311c4..8c8199f 100644 --- a/X1.sln +++ b/X1.sln @@ -19,6 +19,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "X1.WebSocket", "src\X1.WebS EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "X1.DynamicClientCore", "src\X1.DynamicClientCore\X1.DynamicClientCore.csproj", "{6266232F-62BA-47E8-9046-7EA01E3DFD01}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "X1.BackendServices", "src\X1.BackendServices\X1.BackendServices.csproj", "{74295DD6-7D44-4729-D715-2D8A0331010A}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -53,6 +55,10 @@ Global {6266232F-62BA-47E8-9046-7EA01E3DFD01}.Debug|Any CPU.Build.0 = Debug|Any CPU {6266232F-62BA-47E8-9046-7EA01E3DFD01}.Release|Any CPU.ActiveCfg = Release|Any CPU {6266232F-62BA-47E8-9046-7EA01E3DFD01}.Release|Any CPU.Build.0 = Release|Any CPU + {74295DD6-7D44-4729-D715-2D8A0331010A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {74295DD6-7D44-4729-D715-2D8A0331010A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {74295DD6-7D44-4729-D715-2D8A0331010A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {74295DD6-7D44-4729-D715-2D8A0331010A}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -65,5 +71,9 @@ Global {6CF192C7-060B-4328-B9F4-B05BD7401232} = {C0426B52-8F01-41DE-966C-ADC8DD078638} {155D6C93-9A46-45CD-B21F-0F60719515D0} = {C0426B52-8F01-41DE-966C-ADC8DD078638} {6266232F-62BA-47E8-9046-7EA01E3DFD01} = {C0426B52-8F01-41DE-966C-ADC8DD078638} + {74295DD6-7D44-4729-D715-2D8A0331010A} = {C0426B52-8F01-41DE-966C-ADC8DD078638} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {0A33BDD5-4A81-4D56-B339-D55FCFF8923D} EndGlobalSection EndGlobal diff --git a/src/X1.Application/DependencyInjection.cs b/src/X1.Application/DependencyInjection.cs index fe6c9fc..545fabe 100644 --- a/src/X1.Application/DependencyInjection.cs +++ b/src/X1.Application/DependencyInjection.cs @@ -2,11 +2,8 @@ using Microsoft.Extensions.DependencyInjection; using MediatR; using FluentValidation; using CellularManagement.Application.Behaviours; -using CellularManagement.Domain.Services; using Microsoft.Extensions.Configuration; -using CellularManagement.Domain.Options; -using X1.Application.BackendServiceManager; -using X1.Domain.Transmission; + namespace CellularManagement.Application; @@ -43,12 +40,6 @@ public static class DependencyInjection // 注册验证器 services.AddScoped(typeof(IPipelineBehavior<,>), typeof(ValidationBehaviour<,>)); - services.AddSingleton(); - // 注册协议通道管理器(单例,因为需要在整个应用生命周期中保持状态) - services.AddSingleton(); - - // 注册后台服务(依赖于上面的服务) - services.AddHostedService(); return services; } diff --git a/src/X1.Application/Features/DeviceRuntimes/Commands/StartDeviceRuntime/StartDeviceRuntimeCommandHandler.cs b/src/X1.Application/Features/DeviceRuntimes/Commands/StartDeviceRuntime/StartDeviceRuntimeCommandHandler.cs index b31551e..8856ce0 100644 --- a/src/X1.Application/Features/DeviceRuntimes/Commands/StartDeviceRuntime/StartDeviceRuntimeCommandHandler.cs +++ b/src/X1.Application/Features/DeviceRuntimes/Commands/StartDeviceRuntime/StartDeviceRuntimeCommandHandler.cs @@ -5,11 +5,11 @@ using CellularManagement.Domain.Entities.Device; using CellularManagement.Domain.Repositories.Device; using CellularManagement.Domain.Repositories.Base; using CellularManagement.Domain.Services; -using X1.DynamicClientCore.Features; using CellularManagement.Domain.Repositories.NetworkProfile; -using X1.DynamicClientCore.Models; using X1.Domain.Models; using System.Collections.Concurrent; +using X1.Domain.ExternalCommunication.Models; +using X1.Domain.ExternalCommunication; namespace CellularManagement.Application.Features.DeviceRuntimes.Commands.StartDeviceRuntime; diff --git a/src/X1.Application/Features/DeviceRuntimes/Commands/StopDeviceRuntime/StopDeviceRuntimeCommandHandler.cs b/src/X1.Application/Features/DeviceRuntimes/Commands/StopDeviceRuntime/StopDeviceRuntimeCommandHandler.cs index 5b18650..0cd5902 100644 --- a/src/X1.Application/Features/DeviceRuntimes/Commands/StopDeviceRuntime/StopDeviceRuntimeCommandHandler.cs +++ b/src/X1.Application/Features/DeviceRuntimes/Commands/StopDeviceRuntime/StopDeviceRuntimeCommandHandler.cs @@ -5,9 +5,8 @@ using CellularManagement.Domain.Entities.Device; using CellularManagement.Domain.Repositories.Device; using CellularManagement.Domain.Repositories.Base; using CellularManagement.Domain.Services; -using X1.DynamicClientCore.Features; -using X1.DynamicClientCore.Models; -using Microsoft.EntityFrameworkCore.Metadata; +using X1.Domain.ExternalCommunication.Models; +using X1.Domain.ExternalCommunication; namespace CellularManagement.Application.Features.DeviceRuntimes.Commands.StopDeviceRuntime; diff --git a/src/X1.Application/Features/Devices/Commands/CreateDevice/CreateDeviceCommandHandler.cs b/src/X1.Application/Features/Devices/Commands/CreateDevice/CreateDeviceCommandHandler.cs index b69c93e..1c100e6 100644 --- a/src/X1.Application/Features/Devices/Commands/CreateDevice/CreateDeviceCommandHandler.cs +++ b/src/X1.Application/Features/Devices/Commands/CreateDevice/CreateDeviceCommandHandler.cs @@ -6,9 +6,8 @@ using CellularManagement.Domain.Repositories; using CellularManagement.Domain.Repositories.Device; using CellularManagement.Domain.Repositories.Base; using CellularManagement.Domain.Services; -using X1.DynamicClientCore.Features; -using X1.DynamicClientCore.Models; -using X1.DynamicClientCore.Interfaces; +using X1.Domain.ExternalCommunication.Models; +using X1.Domain.ExternalCommunication; namespace CellularManagement.Application.Features.Devices.Commands.CreateDevice; diff --git a/src/X1.Application/Features/TerminalDevices/Commands/CreateTerminalDevice/CreateTerminalDeviceCommandHandler.cs b/src/X1.Application/Features/TerminalDevices/Commands/CreateTerminalDevice/CreateTerminalDeviceCommandHandler.cs index 4cc7cd3..64a5419 100644 --- a/src/X1.Application/Features/TerminalDevices/Commands/CreateTerminalDevice/CreateTerminalDeviceCommandHandler.cs +++ b/src/X1.Application/Features/TerminalDevices/Commands/CreateTerminalDevice/CreateTerminalDeviceCommandHandler.cs @@ -6,11 +6,10 @@ using CellularManagement.Domain.Repositories; using CellularManagement.Domain.Repositories.Device; using CellularManagement.Domain.Repositories.Base; using CellularManagement.Domain.Services; -using X1.DynamicClientCore.Features; -using X1.DynamicClientCore.Models; -using X1.DynamicClientCore.Interfaces; using CellularManagement.Domain.Repositories.Terminal; using CellularManagement.Domain.Entities.Terminal; +using X1.Domain.ExternalCommunication.Models; +using X1.Domain.ExternalCommunication; namespace CellularManagement.Application.Features.TerminalDevices.Commands.CreateTerminalDevice; diff --git a/src/X1.Application/X1.Application.csproj b/src/X1.Application/X1.Application.csproj index 602fbe2..1fee1aa 100644 --- a/src/X1.Application/X1.Application.csproj +++ b/src/X1.Application/X1.Application.csproj @@ -3,7 +3,6 @@ - diff --git a/src/X1.Application/BackendServiceManager/DeviceManagementService.cs b/src/X1.BackendServices/BackendServiceManager/DeviceManagementService.cs similarity index 98% rename from src/X1.Application/BackendServiceManager/DeviceManagementService.cs rename to src/X1.BackendServices/BackendServiceManager/DeviceManagementService.cs index 8ba4bb0..f912293 100644 --- a/src/X1.Application/BackendServiceManager/DeviceManagementService.cs +++ b/src/X1.BackendServices/BackendServiceManager/DeviceManagementService.cs @@ -8,15 +8,15 @@ using CellularManagement.Domain.Repositories.Logging; using CellularManagement.Domain.Entities.Logging; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; -using X1.DynamicClientCore.Interfaces; -using X1.DynamicClientCore.Models; using CellularManagement.Domain.Models; using X1.Domain.Transmission; using CellularManagement.Domain.Repositories.Base; using System.Data; using Microsoft.Extensions.DependencyInjection; +using X1.Domain.ExternalCommunication.Models; +using X1.Domain.ExternalCommunication; -namespace X1.Application.BackendServiceManager +namespace X1.BackendServices.BackendServiceManager { /// /// 设备管理服务 - 负责管理设备端点的后台服务 diff --git a/src/X1.Application/BackendServiceManager/IServiceScopeExecutor.cs b/src/X1.BackendServices/BackendServiceManager/IServiceScopeExecutor.cs similarity index 95% rename from src/X1.Application/BackendServiceManager/IServiceScopeExecutor.cs rename to src/X1.BackendServices/BackendServiceManager/IServiceScopeExecutor.cs index c7ebde7..87be748 100644 --- a/src/X1.Application/BackendServiceManager/IServiceScopeExecutor.cs +++ b/src/X1.BackendServices/BackendServiceManager/IServiceScopeExecutor.cs @@ -2,7 +2,7 @@ using System; using System.Threading; using System.Threading.Tasks; -namespace X1.Application.BackendServiceManager +namespace X1.BackendServices.BackendServiceManager { /// /// 服务作用域执行器接口 @@ -26,4 +26,4 @@ namespace X1.Application.BackendServiceManager /// 操作结果 Task ExecuteAsync(Func operation, CancellationToken cancellationToken = default); } -} \ No newline at end of file +} diff --git a/src/X1.Application/BackendServiceManager/OperationResult.cs b/src/X1.BackendServices/BackendServiceManager/OperationResult.cs similarity index 98% rename from src/X1.Application/BackendServiceManager/OperationResult.cs rename to src/X1.BackendServices/BackendServiceManager/OperationResult.cs index 3694877..fcdad83 100644 --- a/src/X1.Application/BackendServiceManager/OperationResult.cs +++ b/src/X1.BackendServices/BackendServiceManager/OperationResult.cs @@ -1,6 +1,6 @@ using System; -namespace X1.Application.BackendServiceManager +namespace X1.BackendServices.BackendServiceManager { /// /// 作用域服务操作结果包装类,用于表示作用域服务操作的成功或失败状态 @@ -106,4 +106,4 @@ namespace X1.Application.BackendServiceManager return new ScopeOperationResult(false, errorMessage); } } -} \ No newline at end of file +} diff --git a/src/X1.Application/BackendServiceManager/ProtocolChannelManager.cs b/src/X1.BackendServices/BackendServiceManager/ProtocolChannelManager.cs similarity index 99% rename from src/X1.Application/BackendServiceManager/ProtocolChannelManager.cs rename to src/X1.BackendServices/BackendServiceManager/ProtocolChannelManager.cs index 0bc2d47..7c9df6b 100644 --- a/src/X1.Application/BackendServiceManager/ProtocolChannelManager.cs +++ b/src/X1.BackendServices/BackendServiceManager/ProtocolChannelManager.cs @@ -8,7 +8,7 @@ using CellularManagement.Domain.Entities.Logging; using Microsoft.Extensions.Logging; using X1.Domain.Transmission; -namespace X1.Application.BackendServiceManager +namespace X1.BackendServices.BackendServiceManager { /// /// 协议通道管理器实现 @@ -156,4 +156,4 @@ namespace X1.Application.BackendServiceManager return _channel.Reader.Count; } } -} \ No newline at end of file +} diff --git a/src/X1.Application/BackendServiceManager/ServiceScopeExecutor.cs b/src/X1.BackendServices/BackendServiceManager/ServiceScopeExecutor.cs similarity index 99% rename from src/X1.Application/BackendServiceManager/ServiceScopeExecutor.cs rename to src/X1.BackendServices/BackendServiceManager/ServiceScopeExecutor.cs index f80dad6..dfe2034 100644 --- a/src/X1.Application/BackendServiceManager/ServiceScopeExecutor.cs +++ b/src/X1.BackendServices/BackendServiceManager/ServiceScopeExecutor.cs @@ -4,7 +4,7 @@ using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; -namespace X1.Application.BackendServiceManager +namespace X1.BackendServices.BackendServiceManager { /// /// 服务作用域执行器实现类 @@ -128,4 +128,4 @@ namespace X1.Application.BackendServiceManager } } } -} \ No newline at end of file +} diff --git a/src/X1.BackendServices/DependencyInjection.cs b/src/X1.BackendServices/DependencyInjection.cs new file mode 100644 index 0000000..1d71e71 --- /dev/null +++ b/src/X1.BackendServices/DependencyInjection.cs @@ -0,0 +1,27 @@ +using Microsoft.Extensions.DependencyInjection; +using X1.BackendServices.BackendServiceManager; +using X1.Domain.Transmission; + +namespace X1.BackendServices; + +public static class DependencyInjection +{ + /// + /// 注册后台服务管理器相关服务 + /// + /// 服务集合 + /// 服务集合 + public static IServiceCollection AddBackendServiceManager(this IServiceCollection services) + { + // 注册服务作用域执行器 + services.AddSingleton(); + + // 注册协议通道管理器(单例,因为需要在整个应用生命周期中保持状态) + services.AddSingleton(); + + // 注册后台服务(依赖于上面的服务) + services.AddHostedService(); + + return services; + } +} diff --git a/src/X1.BackendServices/X1.BackendServices.csproj b/src/X1.BackendServices/X1.BackendServices.csproj new file mode 100644 index 0000000..265983f --- /dev/null +++ b/src/X1.BackendServices/X1.BackendServices.csproj @@ -0,0 +1,20 @@ + + + + net8.0 + enable + enable + + + + + + + + + + + + + + diff --git a/src/X1.DynamicClientCore/Features/IBaseInstrumentClient.cs b/src/X1.Domain/ExternalCommunication/IBaseInstrumentClient.cs similarity index 93% rename from src/X1.DynamicClientCore/Features/IBaseInstrumentClient.cs rename to src/X1.Domain/ExternalCommunication/IBaseInstrumentClient.cs index b019b72..df861ce 100644 --- a/src/X1.DynamicClientCore/Features/IBaseInstrumentClient.cs +++ b/src/X1.Domain/ExternalCommunication/IBaseInstrumentClient.cs @@ -3,9 +3,9 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using X1.DynamicClientCore.Models; +using X1.Domain.ExternalCommunication.Models; -namespace X1.DynamicClientCore.Features +namespace X1.Domain.ExternalCommunication { /// /// 基础仪器客户端接口 diff --git a/src/X1.DynamicClientCore/Features/IInstrumentHttpClient.cs b/src/X1.Domain/ExternalCommunication/IInstrumentHttpClient.cs similarity index 93% rename from src/X1.DynamicClientCore/Features/IInstrumentHttpClient.cs rename to src/X1.Domain/ExternalCommunication/IInstrumentHttpClient.cs index 85cf2d3..a4ebd76 100644 --- a/src/X1.DynamicClientCore/Features/IInstrumentHttpClient.cs +++ b/src/X1.Domain/ExternalCommunication/IInstrumentHttpClient.cs @@ -3,9 +3,8 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using X1.DynamicClientCore.Models; -namespace X1.DynamicClientCore.Features +namespace X1.Domain.ExternalCommunication { /// /// 仪器HTTP客户端接口 diff --git a/src/X1.DynamicClientCore/Features/IInstrumentProtocolClient.cs b/src/X1.Domain/ExternalCommunication/IInstrumentProtocolClient.cs similarity index 96% rename from src/X1.DynamicClientCore/Features/IInstrumentProtocolClient.cs rename to src/X1.Domain/ExternalCommunication/IInstrumentProtocolClient.cs index 7179b84..32784a5 100644 --- a/src/X1.DynamicClientCore/Features/IInstrumentProtocolClient.cs +++ b/src/X1.Domain/ExternalCommunication/IInstrumentProtocolClient.cs @@ -3,9 +3,9 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using X1.DynamicClientCore.Models; +using X1.Domain.ExternalCommunication.Models; -namespace X1.DynamicClientCore.Features +namespace X1.Domain.ExternalCommunication { /// /// 仪器协议客户端接口 diff --git a/src/X1.DynamicClientCore/Interfaces/IServiceEndpointManager.cs b/src/X1.Domain/ExternalCommunication/IServiceEndpointManager.cs similarity index 94% rename from src/X1.DynamicClientCore/Interfaces/IServiceEndpointManager.cs rename to src/X1.Domain/ExternalCommunication/IServiceEndpointManager.cs index 895a312..89394b6 100644 --- a/src/X1.DynamicClientCore/Interfaces/IServiceEndpointManager.cs +++ b/src/X1.Domain/ExternalCommunication/IServiceEndpointManager.cs @@ -1,6 +1,6 @@ -using X1.DynamicClientCore.Models; +using X1.Domain.ExternalCommunication.Models; -namespace X1.DynamicClientCore.Interfaces +namespace X1.Domain.ExternalCommunication { /// /// 服务端点管理器接口 diff --git a/src/X1.DynamicClientCore/Models/ApiActionResult.cs b/src/X1.Domain/ExternalCommunication/Models/ApiActionResult.cs similarity index 98% rename from src/X1.DynamicClientCore/Models/ApiActionResult.cs rename to src/X1.Domain/ExternalCommunication/Models/ApiActionResult.cs index 0a738a8..c145e2e 100644 --- a/src/X1.DynamicClientCore/Models/ApiActionResult.cs +++ b/src/X1.Domain/ExternalCommunication/Models/ApiActionResult.cs @@ -5,7 +5,7 @@ using System.Text; using System.Threading.Tasks; using System.Net; -namespace X1.DynamicClientCore.Models +namespace X1.Domain.ExternalCommunication.Models { /// /// API操作结果 diff --git a/src/X1.DynamicClientCore/Models/CellularNetworkConfiguration.cs b/src/X1.Domain/ExternalCommunication/Models/CellularNetworkConfiguration.cs similarity index 97% rename from src/X1.DynamicClientCore/Models/CellularNetworkConfiguration.cs rename to src/X1.Domain/ExternalCommunication/Models/CellularNetworkConfiguration.cs index 0bfe6fa..1c3de1f 100644 --- a/src/X1.DynamicClientCore/Models/CellularNetworkConfiguration.cs +++ b/src/X1.Domain/ExternalCommunication/Models/CellularNetworkConfiguration.cs @@ -5,7 +5,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace X1.DynamicClientCore.Models +namespace X1.Domain.ExternalCommunication.Models { /// /// 蜂窝网络配置实体 diff --git a/src/X1.DynamicClientCore/Models/CellularNetworkRequest.cs b/src/X1.Domain/ExternalCommunication/Models/CellularNetworkRequest.cs similarity index 92% rename from src/X1.DynamicClientCore/Models/CellularNetworkRequest.cs rename to src/X1.Domain/ExternalCommunication/Models/CellularNetworkRequest.cs index a05be83..dc6334e 100644 --- a/src/X1.DynamicClientCore/Models/CellularNetworkRequest.cs +++ b/src/X1.Domain/ExternalCommunication/Models/CellularNetworkRequest.cs @@ -1,4 +1,4 @@ -namespace X1.DynamicClientCore.Models +namespace X1.Domain.ExternalCommunication.Models { /// /// 蜂窝网络启动请求包装类 diff --git a/src/X1.DynamicClientCore/Models/CircuitBreakerOptions.cs b/src/X1.Domain/ExternalCommunication/Models/CircuitBreakerOptions.cs similarity index 98% rename from src/X1.DynamicClientCore/Models/CircuitBreakerOptions.cs rename to src/X1.Domain/ExternalCommunication/Models/CircuitBreakerOptions.cs index d2d19f3..c1cd51f 100644 --- a/src/X1.DynamicClientCore/Models/CircuitBreakerOptions.cs +++ b/src/X1.Domain/ExternalCommunication/Models/CircuitBreakerOptions.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace X1.DynamicClientCore.Models +namespace X1.Domain.ExternalCommunication.Models { /// /// 熔断器配置选项 diff --git a/src/X1.DynamicClientCore/Models/DeviceInfoResponse.cs b/src/X1.Domain/ExternalCommunication/Models/DeviceInfoResponse.cs similarity index 91% rename from src/X1.DynamicClientCore/Models/DeviceInfoResponse.cs rename to src/X1.Domain/ExternalCommunication/Models/DeviceInfoResponse.cs index 274dae2..e4d7db1 100644 --- a/src/X1.DynamicClientCore/Models/DeviceInfoResponse.cs +++ b/src/X1.Domain/ExternalCommunication/Models/DeviceInfoResponse.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace X1.DynamicClientCore.Models +namespace X1.Domain.ExternalCommunication.Models { /// /// 设备信息响应模型(用于API响应) diff --git a/src/X1.DynamicClientCore/Models/DynamicHttpClientException.cs b/src/X1.Domain/ExternalCommunication/Models/DynamicHttpClientException.cs similarity index 98% rename from src/X1.DynamicClientCore/Models/DynamicHttpClientException.cs rename to src/X1.Domain/ExternalCommunication/Models/DynamicHttpClientException.cs index f20d999..796a10a 100644 --- a/src/X1.DynamicClientCore/Models/DynamicHttpClientException.cs +++ b/src/X1.Domain/ExternalCommunication/Models/DynamicHttpClientException.cs @@ -1,6 +1,6 @@ using System.Runtime.Serialization; -namespace X1.DynamicClientCore.Models +namespace X1.Domain.ExternalCommunication.Models { /// /// 动态HTTP客户端异常 diff --git a/src/X1.DynamicClientCore/Models/HttpRequestOptions.cs b/src/X1.Domain/ExternalCommunication/Models/HttpRequestOptions.cs similarity index 96% rename from src/X1.DynamicClientCore/Models/HttpRequestOptions.cs rename to src/X1.Domain/ExternalCommunication/Models/HttpRequestOptions.cs index 1562635..8aeee99 100644 --- a/src/X1.DynamicClientCore/Models/HttpRequestOptions.cs +++ b/src/X1.Domain/ExternalCommunication/Models/HttpRequestOptions.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace X1.DynamicClientCore.Models +namespace X1.Domain.ExternalCommunication.Models { /// /// HTTP请求选项 - 定义HTTP请求的配置参数 diff --git a/src/X1.DynamicClientCore/Models/ServiceEndpoint.cs b/src/X1.Domain/ExternalCommunication/Models/ServiceEndpoint.cs similarity index 97% rename from src/X1.DynamicClientCore/Models/ServiceEndpoint.cs rename to src/X1.Domain/ExternalCommunication/Models/ServiceEndpoint.cs index 94e66ce..d576678 100644 --- a/src/X1.DynamicClientCore/Models/ServiceEndpoint.cs +++ b/src/X1.Domain/ExternalCommunication/Models/ServiceEndpoint.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace X1.DynamicClientCore.Models +namespace X1.Domain.ExternalCommunication.Models { /// /// 服务端点配置模型 - 定义单个服务的连接配置信息 diff --git a/src/X1.Infrastructure/Configurations/Identity/AuthConfiguration.cs b/src/X1.Domain/Options/AuthConfiguration.cs similarity index 69% rename from src/X1.Infrastructure/Configurations/Identity/AuthConfiguration.cs rename to src/X1.Domain/Options/AuthConfiguration.cs index f1c4427..53299c3 100644 --- a/src/X1.Infrastructure/Configurations/Identity/AuthConfiguration.cs +++ b/src/X1.Domain/Options/AuthConfiguration.cs @@ -1,10 +1,23 @@ -namespace CellularManagement.Infrastructure.Configurations; +namespace CellularManagement.Domain.Options; /// /// 认证配置 +/// 用于配置用户认证相关的参数 /// +/// +/// 设计说明: +/// 1. 使用强类型配置,避免魔法字符串 +/// 2. 支持从配置文件加载 +/// 3. 提供合理的默认值 +/// 4. 集中管理认证相关配置 +/// public class AuthConfiguration { + /// + /// 配置节点名称 + /// + public const string SectionName = "Auth"; + /// /// 登录尝试次数限制 /// @@ -34,4 +47,4 @@ public class AuthConfiguration /// 刷新令牌过期时间(天) /// public int RefreshTokenExpirationDays { get; set; } = 7; -} \ No newline at end of file +} diff --git a/src/X1.Domain/X1.Domain.csproj b/src/X1.Domain/X1.Domain.csproj index 05abf4f..9e4c638 100644 --- a/src/X1.Domain/X1.Domain.csproj +++ b/src/X1.Domain/X1.Domain.csproj @@ -9,9 +9,9 @@ - - - + + + diff --git a/src/X1.DynamicClientCore/Core/DynamicHttpClient.Core.cs b/src/X1.DynamicClientCore/Core/DynamicHttpClient.Core.cs index 35aaac4..66e4293 100644 --- a/src/X1.DynamicClientCore/Core/DynamicHttpClient.Core.cs +++ b/src/X1.DynamicClientCore/Core/DynamicHttpClient.Core.cs @@ -1,6 +1,6 @@ using Microsoft.Extensions.Logging; using Newtonsoft.Json; -using X1.DynamicClientCore.Models; +using X1.Domain.ExternalCommunication.Models; namespace X1.DynamicClientCore.Core { diff --git a/src/X1.DynamicClientCore/Core/DynamicHttpClient.Sync.cs b/src/X1.DynamicClientCore/Core/DynamicHttpClient.Sync.cs index 60335af..76f883a 100644 --- a/src/X1.DynamicClientCore/Core/DynamicHttpClient.Sync.cs +++ b/src/X1.DynamicClientCore/Core/DynamicHttpClient.Sync.cs @@ -1,6 +1,6 @@ using Microsoft.Extensions.Logging; using Newtonsoft.Json; -using X1.DynamicClientCore.Models; +using X1.Domain.ExternalCommunication.Models; namespace X1.DynamicClientCore.Core { diff --git a/src/X1.DynamicClientCore/Core/DynamicHttpClient.SyncCore.cs b/src/X1.DynamicClientCore/Core/DynamicHttpClient.SyncCore.cs index 85097e4..e28e079 100644 --- a/src/X1.DynamicClientCore/Core/DynamicHttpClient.SyncCore.cs +++ b/src/X1.DynamicClientCore/Core/DynamicHttpClient.SyncCore.cs @@ -2,7 +2,7 @@ using Microsoft.Extensions.Logging; using Newtonsoft.Json; using Polly; using Polly.CircuitBreaker; -using X1.DynamicClientCore.Models; +using X1.Domain.ExternalCommunication.Models; namespace X1.DynamicClientCore.Core { diff --git a/src/X1.DynamicClientCore/Core/DynamicHttpClient.cs b/src/X1.DynamicClientCore/Core/DynamicHttpClient.cs index af8d02f..824a78c 100644 --- a/src/X1.DynamicClientCore/Core/DynamicHttpClient.cs +++ b/src/X1.DynamicClientCore/Core/DynamicHttpClient.cs @@ -1,7 +1,8 @@ using Microsoft.Extensions.Logging; using Newtonsoft.Json; +using X1.Domain.ExternalCommunication; +using X1.Domain.ExternalCommunication.Models; using X1.DynamicClientCore.Interfaces; -using X1.DynamicClientCore.Models; namespace X1.DynamicClientCore.Core { diff --git a/src/X1.DynamicClientCore/Extensions/ServiceCollectionExtensions.cs b/src/X1.DynamicClientCore/Extensions/ServiceCollectionExtensions.cs index 2c3e314..1fd9954 100644 --- a/src/X1.DynamicClientCore/Extensions/ServiceCollectionExtensions.cs +++ b/src/X1.DynamicClientCore/Extensions/ServiceCollectionExtensions.cs @@ -1,9 +1,11 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using X1.DynamicClientCore.Interfaces; -using X1.DynamicClientCore.Models; using X1.DynamicClientCore.Core; using X1.DynamicClientCore.Infrastructure; +using X1.Domain.ExternalCommunication.Models; +using X1.DynamicClientCore.Service; +using X1.Domain.ExternalCommunication; namespace X1.DynamicClientCore.Extensions { @@ -46,9 +48,9 @@ namespace X1.DynamicClientCore.Extensions services.AddSingleton(); // 注册仪器协议客户端(单例) - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); return services; } diff --git a/src/X1.DynamicClientCore/FileOperations/DynamicHttpClient.FileDownload.cs b/src/X1.DynamicClientCore/FileOperations/DynamicHttpClient.FileDownload.cs index 7837821..9d6c7b4 100644 --- a/src/X1.DynamicClientCore/FileOperations/DynamicHttpClient.FileDownload.cs +++ b/src/X1.DynamicClientCore/FileOperations/DynamicHttpClient.FileDownload.cs @@ -1,5 +1,5 @@ using Microsoft.Extensions.Logging; -using X1.DynamicClientCore.Models; +using X1.Domain.ExternalCommunication.Models; namespace X1.DynamicClientCore.Core { diff --git a/src/X1.DynamicClientCore/FileOperations/DynamicHttpClient.FileInfo.cs b/src/X1.DynamicClientCore/FileOperations/DynamicHttpClient.FileInfo.cs index f56f1b5..141e71f 100644 --- a/src/X1.DynamicClientCore/FileOperations/DynamicHttpClient.FileInfo.cs +++ b/src/X1.DynamicClientCore/FileOperations/DynamicHttpClient.FileInfo.cs @@ -1,4 +1,4 @@ -using X1.DynamicClientCore.Models; +using X1.Domain.ExternalCommunication.Models; namespace X1.DynamicClientCore.Core { diff --git a/src/X1.DynamicClientCore/FileOperations/DynamicHttpClient.FileUpload.cs b/src/X1.DynamicClientCore/FileOperations/DynamicHttpClient.FileUpload.cs index 070ce6a..892af2a 100644 --- a/src/X1.DynamicClientCore/FileOperations/DynamicHttpClient.FileUpload.cs +++ b/src/X1.DynamicClientCore/FileOperations/DynamicHttpClient.FileUpload.cs @@ -1,6 +1,6 @@ using Microsoft.Extensions.Logging; using Newtonsoft.Json; -using X1.DynamicClientCore.Models; +using X1.Domain.ExternalCommunication.Models; namespace X1.DynamicClientCore.Core { diff --git a/src/X1.DynamicClientCore/Infrastructure/CircuitBreakerManager.cs b/src/X1.DynamicClientCore/Infrastructure/CircuitBreakerManager.cs index 5884a1e..7c6458e 100644 --- a/src/X1.DynamicClientCore/Infrastructure/CircuitBreakerManager.cs +++ b/src/X1.DynamicClientCore/Infrastructure/CircuitBreakerManager.cs @@ -2,8 +2,8 @@ using Microsoft.Extensions.Logging; using Polly; using Polly.CircuitBreaker; using Polly.Extensions.Http; +using X1.Domain.ExternalCommunication.Models; using X1.DynamicClientCore.Interfaces; -using X1.DynamicClientCore.Models; namespace X1.DynamicClientCore.Infrastructure { diff --git a/src/X1.DynamicClientCore/Infrastructure/ServiceEndpointManager.cs b/src/X1.DynamicClientCore/Infrastructure/ServiceEndpointManager.cs index 118be03..fff0a38 100644 --- a/src/X1.DynamicClientCore/Infrastructure/ServiceEndpointManager.cs +++ b/src/X1.DynamicClientCore/Infrastructure/ServiceEndpointManager.cs @@ -1,5 +1,6 @@ +using X1.Domain.ExternalCommunication; +using X1.Domain.ExternalCommunication.Models; using X1.DynamicClientCore.Interfaces; -using X1.DynamicClientCore.Models; namespace X1.DynamicClientCore.Infrastructure { diff --git a/src/X1.DynamicClientCore/Interfaces/IAsyncHttpClient.cs b/src/X1.DynamicClientCore/Interfaces/IAsyncHttpClient.cs index 8cd8777..d80e216 100644 --- a/src/X1.DynamicClientCore/Interfaces/IAsyncHttpClient.cs +++ b/src/X1.DynamicClientCore/Interfaces/IAsyncHttpClient.cs @@ -1,4 +1,4 @@ -using X1.DynamicClientCore.Models; +using X1.Domain.ExternalCommunication.Models; namespace X1.DynamicClientCore.Interfaces { diff --git a/src/X1.DynamicClientCore/Interfaces/ICircuitBreakerManager.cs b/src/X1.DynamicClientCore/Interfaces/ICircuitBreakerManager.cs index db83fa4..c0d43a2 100644 --- a/src/X1.DynamicClientCore/Interfaces/ICircuitBreakerManager.cs +++ b/src/X1.DynamicClientCore/Interfaces/ICircuitBreakerManager.cs @@ -1,6 +1,6 @@ using Polly; using Polly.CircuitBreaker; -using X1.DynamicClientCore.Models; +using X1.Domain.ExternalCommunication.Models; namespace X1.DynamicClientCore.Interfaces { diff --git a/src/X1.DynamicClientCore/Interfaces/IDynamicHttpClient.cs b/src/X1.DynamicClientCore/Interfaces/IDynamicHttpClient.cs index 8c4720f..0fd98c2 100644 --- a/src/X1.DynamicClientCore/Interfaces/IDynamicHttpClient.cs +++ b/src/X1.DynamicClientCore/Interfaces/IDynamicHttpClient.cs @@ -1,4 +1,4 @@ -using X1.DynamicClientCore.Models; + namespace X1.DynamicClientCore.Interfaces { diff --git a/src/X1.DynamicClientCore/Interfaces/IFileHttpClient.cs b/src/X1.DynamicClientCore/Interfaces/IFileHttpClient.cs index baa6a99..4433e2e 100644 --- a/src/X1.DynamicClientCore/Interfaces/IFileHttpClient.cs +++ b/src/X1.DynamicClientCore/Interfaces/IFileHttpClient.cs @@ -1,4 +1,5 @@ -using X1.DynamicClientCore.Models; +using X1.Domain.ExternalCommunication.Models; + namespace X1.DynamicClientCore.Interfaces { diff --git a/src/X1.DynamicClientCore/Interfaces/IHttpClientBase.cs b/src/X1.DynamicClientCore/Interfaces/IHttpClientBase.cs index 225de2e..b9d9734 100644 --- a/src/X1.DynamicClientCore/Interfaces/IHttpClientBase.cs +++ b/src/X1.DynamicClientCore/Interfaces/IHttpClientBase.cs @@ -1,4 +1,4 @@ -using X1.DynamicClientCore.Models; + namespace X1.DynamicClientCore.Interfaces { diff --git a/src/X1.DynamicClientCore/Interfaces/ISyncHttpClient.cs b/src/X1.DynamicClientCore/Interfaces/ISyncHttpClient.cs index cdd862a..97f078e 100644 --- a/src/X1.DynamicClientCore/Interfaces/ISyncHttpClient.cs +++ b/src/X1.DynamicClientCore/Interfaces/ISyncHttpClient.cs @@ -1,4 +1,4 @@ -using X1.DynamicClientCore.Models; +using X1.Domain.ExternalCommunication.Models; namespace X1.DynamicClientCore.Interfaces { diff --git a/src/X1.DynamicClientCore/Features/Service/InstrumentProtocolClient.cs b/src/X1.DynamicClientCore/Service/InstrumentProtocolClient.cs similarity index 98% rename from src/X1.DynamicClientCore/Features/Service/InstrumentProtocolClient.cs rename to src/X1.DynamicClientCore/Service/InstrumentProtocolClient.cs index d95d71e..412dd83 100644 --- a/src/X1.DynamicClientCore/Features/Service/InstrumentProtocolClient.cs +++ b/src/X1.DynamicClientCore/Service/InstrumentProtocolClient.cs @@ -4,10 +4,12 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; +using X1.Domain.ExternalCommunication; +using X1.Domain.ExternalCommunication.Models; using X1.DynamicClientCore.Interfaces; -using X1.DynamicClientCore.Models; -namespace X1.DynamicClientCore.Features.Service + +namespace X1.DynamicClientCore.Service { /// /// 设备协议客户端实现类 diff --git a/src/X1.DynamicClientCore/X1.DynamicClientCore.csproj b/src/X1.DynamicClientCore/X1.DynamicClientCore.csproj index 0b6d07c..b7aa428 100644 --- a/src/X1.DynamicClientCore/X1.DynamicClientCore.csproj +++ b/src/X1.DynamicClientCore/X1.DynamicClientCore.csproj @@ -8,13 +8,17 @@ - - - - + + + + + + + + \ No newline at end of file diff --git a/src/X1.Presentation/Controllers/AuthController.cs b/src/X1.Presentation/Controllers/AuthController.cs index c47b9be..ec7d5be 100644 --- a/src/X1.Presentation/Controllers/AuthController.cs +++ b/src/X1.Presentation/Controllers/AuthController.cs @@ -7,7 +7,7 @@ using CellularManagement.Application.Common; using Microsoft.Extensions.Logging; using CellularManagement.Domain.Services; using Microsoft.Extensions.Caching.Memory; -using CellularManagement.Infrastructure.Configurations; +using CellularManagement.Domain.Options; // 从 Domain 层引用 using Microsoft.Extensions.Options; using Microsoft.AspNetCore.Http; using CellularManagement.Presentation.Abstractions; diff --git a/src/X1.Presentation/X1.Presentation.csproj b/src/X1.Presentation/X1.Presentation.csproj index 06d7da5..1e7b612 100644 --- a/src/X1.Presentation/X1.Presentation.csproj +++ b/src/X1.Presentation/X1.Presentation.csproj @@ -14,7 +14,6 @@ - diff --git a/src/X1.WebAPI/Program.cs b/src/X1.WebAPI/Program.cs index 68b66c4..b7c8b75 100644 --- a/src/X1.WebAPI/Program.cs +++ b/src/X1.WebAPI/Program.cs @@ -22,6 +22,7 @@ using System.Text; using CellularManagement.Domain.Options; using X1.WebAPI.Extensions; using X1.DynamicClientCore.Extensions; +using X1.BackendServices; // 创建 Web 应用程序构建器 var builder = WebApplication.CreateBuilder(args); @@ -43,6 +44,9 @@ builder.Services.AddApplication(builder.Configuration); builder.Services.AddDynamicServiceClient(); +// 注册后台服务管理器 +builder.Services.AddBackendServiceManager(); + // 注册表现层服务 // 包括控制器、视图、中间件等表现层相关服务 builder.Services.AddPresentation(); @@ -138,7 +142,7 @@ builder.Services.AddCors(options => // 配置认证服务 // 从配置文件中读取认证相关配置 -builder.Services.Configure(builder.Configuration.GetSection("Auth")); +builder.Services.Configure(builder.Configuration.GetSection(JwtOptions.SectionName)); // 配置 JWT Bearer 认证 builder.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme) diff --git a/src/X1.WebAPI/X1.WebAPI.csproj b/src/X1.WebAPI/X1.WebAPI.csproj index a729836..4325682 100644 --- a/src/X1.WebAPI/X1.WebAPI.csproj +++ b/src/X1.WebAPI/X1.WebAPI.csproj @@ -32,6 +32,7 @@ + diff --git a/src/modify.md b/src/modify.md index eff28df..201b0d8 100644 --- a/src/modify.md +++ b/src/modify.md @@ -941,4 +941,36 @@ 2024年 #### 修改原因: -为AT操作和ADB操作实现完整的Features层,提供标准的CRUD操作和查询功能,支持终端设备管理系统的完整功能。 \ No newline at end of file +为AT操作和ADB操作实现完整的Features层,提供标准的CRUD操作和查询功能,支持终端设备管理系统的完整功能。 + +## 2025-01-12 BackendServiceManager 迁移 + +### 迁移内容 +将 `X1.Application.BackendServiceManager` 完全迁移到 `X1.BackendServices.BackendServiceManager` + +### 迁移的文件 +1. `IServiceScopeExecutor.cs` - 服务作用域执行器接口 +2. `ServiceScopeExecutor.cs` - 服务作用域执行器实现 +3. `OperationResult.cs` - 操作结果包装类 +4. `ProtocolChannelManager.cs` - 协议通道管理器 +5. `DeviceManagementService.cs` - 设备管理后台服务 + +### 修改的文件 +1. `X1.BackendServices/DependencyInjection.cs` - 添加依赖注入配置 +2. `X1.BackendServices/X1.BackendServices.csproj` - 添加项目引用和包引用 +3. `X1.Application/DependencyInjection.cs` - 移除 BackendServiceManager 相关注册 +4. `X1.WebAPI/Program.cs` - 添加对 X1.BackendServices 的依赖注入 +5. `X1.WebAPI/X1.WebAPI.csproj` - 添加对 X1.BackendServices 的项目引用 + +### 命名空间变更 +- 从 `X1.Application.BackendServiceManager` 改为 `X1.BackendServices.BackendServiceManager` + +### 验证结果 +- ✅ 编译成功,无错误 +- ✅ 所有依赖关系已正确更新 +- ✅ 服务注册已正确配置 + +### 完成状态 +- ✅ 已成功删除 `X1.Application/BackendServiceManager` 目录 +- ✅ 项目编译正常,无错误 +- ✅ 迁移完成,所有功能正常工作 \ No newline at end of file