Skip to content

Commit b7c17e8

Browse files
committed
refactor: 统一将_gameAppClient重命名为_gameAppServiceClient以保持命名一致性
1 parent 44c33c0 commit b7c17e8

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

GameFrameX.StartUp/AppStartUpByGameAppClient.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ namespace GameFrameX.StartUp;
4444
/// </summary>
4545
public abstract partial class AppStartUpBase
4646
{
47-
private GameAppServiceClient _gameAppClient;
47+
private GameAppServiceClient _gameAppServiceClient;
4848

4949
/// <summary>
5050
/// 启动与发现中心(DiscoveryCenter)通信的客户端,用于注册当前服务器实例并接收发现中心推送的消息
@@ -76,7 +76,7 @@ private void StartGameAppClient()
7676
var endPoint = new DnsEndPoint(Setting.DiscoveryCenterHost, Setting.DiscoveryCenterPort);
7777

7878
// 根据配置创建发现中心终结点并初始化客户端
79-
_gameAppClient = new GameAppServiceClient(endPoint, gameAppServiceConfiguration);
79+
_gameAppServiceClient = new GameAppServiceClient(endPoint, gameAppServiceConfiguration);
8080
}
8181

8282
/// <summary>
@@ -97,7 +97,7 @@ protected virtual MessageObject GameAppClientOnHeartBeat()
9797
/// <returns>表示异步操作的任务,任务结果为IRpcResult对象</returns>
9898
public Task<IRpcResult> Call<T>(MessageObject messageObject, int timeOut = 10000) where T : IResponseMessage, new()
9999
{
100-
return _gameAppClient.Call<T>(messageObject, timeOut);
100+
return _gameAppServiceClient.Call<T>(messageObject, timeOut);
101101
}
102102

103103
/// <summary>
@@ -107,7 +107,7 @@ protected virtual MessageObject GameAppClientOnHeartBeat()
107107
public void Send(MessageObject message)
108108
{
109109
// 如果客户端已初始化,则调用其方法将消息发送至发现中心服务器
110-
_gameAppClient?.Send(message);
110+
_gameAppServiceClient?.Send(message);
111111
}
112112

113113
/// <summary>

GameFrameX.StartUp/AppStartUpByServer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ protected async Task StartServerAsync<TMessageDecoderHandler, TMessageEncoderHan
112112
protected async Task StopServerAsync()
113113
{
114114
GlobalSettings.IsAppRunning = false;
115-
_gameAppClient?.Stop();
115+
_gameAppServiceClient?.Stop();
116116

117117
if (_gameServer != null)
118118
{

0 commit comments

Comments
 (0)