From 52ca57eaf9a20c6d91579c4dfaf27da3f1484590 Mon Sep 17 00:00:00 2001 From: Blank Date: Sat, 10 Oct 2026 18:38:56 +0800 Subject: [PATCH] =?UTF-8?q?fix(localization):=20=E9=87=8D=E5=91=BD?= =?UTF-8?q?=E5=90=8D=20RemoteMessaging.Client=20=E5=B5=8C=E5=A5=97?= =?UTF-8?q?=E7=B1=BB=E6=B6=88=E9=99=A4=E9=81=AE=E8=94=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Keys.RemoteMessaging 下嵌套类 Client 遮蔽外层 Keys.Client 成员, 触发 Sonar S3218 CRITICAL。按被遮蔽成员名加 Module 后缀约定重命名为 ClientModule,并同步 RemoteMessageClient 4 处类型引用;const 字面量 与 resx 资源键逐字节不变。 Linear: GFX-885 --- GameFrameX.Localization/Keys.RemoteMessaging.cs | 2 +- .../Composition/RemoteMessageClient.cs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/GameFrameX.Localization/Keys.RemoteMessaging.cs b/GameFrameX.Localization/Keys.RemoteMessaging.cs index 4df237d4..a6766305 100644 --- a/GameFrameX.Localization/Keys.RemoteMessaging.cs +++ b/GameFrameX.Localization/Keys.RemoteMessaging.cs @@ -245,7 +245,7 @@ public static class Observability /// /// 远程消息客户端类别键 /// - public static class Client + public static class ClientModule { /// /// SendOneWayAsync: 熔断器已打开, Service: {0} diff --git a/GameFrameX.NetWork.RemoteMessaging/Composition/RemoteMessageClient.cs b/GameFrameX.NetWork.RemoteMessaging/Composition/RemoteMessageClient.cs index 94377f94..4e8b0143 100644 --- a/GameFrameX.NetWork.RemoteMessaging/Composition/RemoteMessageClient.cs +++ b/GameFrameX.NetWork.RemoteMessaging/Composition/RemoteMessageClient.cs @@ -555,7 +555,7 @@ public async Task SendOneWayAsync( if (!_circuitBreaker.IsAllowed(serviceName)) { // Localization: RemoteMessaging.Client.SendOneWayCircuitBreakerOpen - SendOneWayAsync: 熔断器已打开, Service: {0} - LogHelper.Warning(LocalizationService.GetString(Localization.Keys.RemoteMessaging.Client.SendOneWayCircuitBreakerOpen, serviceName)); + LogHelper.Warning(LocalizationService.GetString(Localization.Keys.RemoteMessaging.ClientModule.SendOneWayCircuitBreakerOpen, serviceName)); return; } @@ -563,7 +563,7 @@ public async Task SendOneWayAsync( if (healthScore <= 0) { // Localization: RemoteMessaging.Client.SendOneWayHealthScoreLow - SendOneWayAsync: 服务健康评分过低, Service: {0}, Score: {1} - LogHelper.Warning(LocalizationService.GetString(Localization.Keys.RemoteMessaging.Client.SendOneWayHealthScoreLow, serviceName, healthScore)); + LogHelper.Warning(LocalizationService.GetString(Localization.Keys.RemoteMessaging.ClientModule.SendOneWayHealthScoreLow, serviceName, healthScore)); return; } @@ -576,7 +576,7 @@ public async Task SendOneWayAsync( if (_protocolVersionNegotiator != null && !_protocolVersionNegotiator.IsCompatible(requestMessage.GetType())) { // Localization: RemoteMessaging.Client.SendOneWayProtocolVersionIncompatible - SendOneWayAsync: 协议版本不兼容, MessageType: {0} - LogHelper.Warning(LocalizationService.GetString(Localization.Keys.RemoteMessaging.Client.SendOneWayProtocolVersionIncompatible, requestMessage.GetType().Name)); + LogHelper.Warning(LocalizationService.GetString(Localization.Keys.RemoteMessaging.ClientModule.SendOneWayProtocolVersionIncompatible, requestMessage.GetType().Name)); return; } @@ -692,7 +692,7 @@ private async Task RunExceptionInterceptorsAsync(RemoteCallContext context, Mess catch (Exception ex) { // Localization: RemoteMessaging.Client.InterceptorOnExceptionFailed - 拦截器 OnExceptionAsync 失败 - LogHelper.Error(ex, LocalizationService.GetString(Localization.Keys.RemoteMessaging.Client.InterceptorOnExceptionFailed)); + LogHelper.Error(ex, LocalizationService.GetString(Localization.Keys.RemoteMessaging.ClientModule.InterceptorOnExceptionFailed)); } } }