Skip to content

Commit 9a444ca

Browse files
committed
[修改]1. 修改启动参数的默认值配置和类型修改
1 parent a808017 commit 9a444ca

File tree

2 files changed

+28
-26
lines changed

2 files changed

+28
-26
lines changed

GameFrameX.StartUp/Options/LauncherOptions.cs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,36 +17,36 @@ public sealed class LauncherOptions
1717
/// APM监控端口
1818
/// </summary>
1919
[Option(nameof(APMPort), HelpText = "APM监控端口")]
20-
public int APMPort { get; set; }
20+
public ushort APMPort { get; set; }
2121

2222
/// <summary>
23-
/// 是否是Debug 模式
23+
/// 是否是Debug打印日志模式,默认值为false
2424
/// </summary>
25-
[Option(nameof(IsDebug), HelpText = "是否是Debug 模式")]
25+
[Option(nameof(IsDebug), Default = false, HelpText = "是否是Debug打印日志模式,默认值为false")]
2626
public bool IsDebug { get; set; }
2727

2828
/// <summary>
29-
/// 是否打印发送数据
29+
/// 是否打印发送数据,只有在IsDebug为true时有效,默认值为false
3030
/// </summary>
31-
[Option(nameof(IsDebugSend), HelpText = "是否打印发送数据")]
31+
[Option(nameof(IsDebugSend), Default = false, HelpText = "是否打印发送数据,只有在IsDebug为true时有效,默认值为false")]
3232
public bool IsDebugSend { get; set; }
3333

3434
/// <summary>
35-
/// 是否打印发送的心跳数据
35+
/// 是否打印发送的心跳数据,只有在IsDebugSend为true时有效,默认值为false
3636
/// </summary>
37-
[Option(nameof(IsDebugSendHeartBeat), HelpText = "是否打印发送的心跳数据")]
37+
[Option(nameof(IsDebugSendHeartBeat), Default = false, HelpText = "是否打印发送的心跳数据,只有在IsDebugSend为true时有效,默认值为false")]
3838
public bool IsDebugSendHeartBeat { get; set; }
3939

4040
/// <summary>
41-
/// 是否打印接收数据
41+
/// 是否打印接收数据,只有在IsDebug为true时有效,默认值为false
4242
/// </summary>
43-
[Option(nameof(IsDebugReceive), HelpText = "是否打印接收数据")]
43+
[Option(nameof(IsDebugReceive), Default = false, HelpText = "是否打印接收数据,只有在IsDebug为true时有效,默认值为false")]
4444
public bool IsDebugReceive { get; set; }
4545

4646
/// <summary>
47-
/// 是否打印接收的心跳数据
47+
/// 是否打印接收的心跳数据,只有在IsDebugReceive为true时有效,默认值为false
4848
/// </summary>
49-
[Option(nameof(IsDebugReceiveHeartBeat), HelpText = "是否打印接收的心跳数据")]
49+
[Option(nameof(IsDebugReceiveHeartBeat), Default = false, HelpText = "是否打印接收的心跳数据,只有在IsDebugReceive为true时有效,默认值为false")]
5050
public bool IsDebugReceiveHeartBeat { get; set; }
5151

5252
/// <summary>
@@ -101,19 +101,19 @@ public sealed class LauncherOptions
101101
/// HTTP 端口
102102
/// </summary>
103103
[Option(nameof(HttpPort), HelpText = "HTTP 端口")]
104-
public int HttpPort { get; set; }
104+
public ushort HttpPort { get; set; }
105105

106106
/// <summary>
107107
/// HTTPS 端口
108108
/// </summary>
109109
[Option(nameof(HttpsPort), HelpText = "HTTPS 端口")]
110-
public int HttpsPort { get; set; }
110+
public ushort HttpsPort { get; set; }
111111

112112
/// <summary>
113113
/// WebSocket 端口
114114
/// </summary>
115115
[Option(nameof(WsPort), HelpText = "WebSocket 端口")]
116-
public int WsPort { get; set; }
116+
public ushort WsPort { get; set; }
117117

118118
/// <summary>
119119
/// 游戏逻辑服务器的处理最小模块ID
@@ -131,7 +131,7 @@ public sealed class LauncherOptions
131131
/// WebSocket 加密端口
132132
/// </summary>
133133
[Option(nameof(WssPort), HelpText = "WebSocket 加密端口")]
134-
public int WssPort { get; set; }
134+
public ushort WssPort { get; set; }
135135

136136
/// <summary>
137137
/// Wss 使用的证书路径

GameFrameX.Utility/Setting/AppSetting.cs

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@ public AppSetting()
2626
IsDebug = true;
2727
IsDebugReceive = true;
2828
IsDebugSend = true;
29+
IsDebugSendHeartBeat = true;
30+
IsDebugReceiveHeartBeat = true;
2931
#endif
30-
LaunchTime= DateTime.Now;
32+
LaunchTime = DateTime.Now;
3133
}
3234

3335
/// <summary>
@@ -120,27 +122,27 @@ public string ToFormatString()
120122
#region 从配置文件读取的属性
121123

122124
/// <summary>
123-
/// 是否是调试模式
125+
/// 是否是Debug打印日志模式,默认值为false
124126
/// </summary>
125127
public bool IsDebug { get; set; }
126128

127129
/// <summary>
128-
/// 是否打印发送的数据
130+
/// 是否打印发送数据,只有在IsDebug为true时有效,默认值为false
129131
/// </summary>
130132
public bool IsDebugSend { get; set; }
131133

132134
/// <summary>
133-
/// 是否打印发送的心跳数据
135+
/// 是否打印发送的心跳数据,只有在IsDebugSend为true时有效,默认值为false
134136
/// </summary>
135137
public bool IsDebugSendHeartBeat { get; set; }
136138

137139
/// <summary>
138-
/// 是否打印接收的数据
140+
/// 是否打印接收数据,只有在IsDebug为true时有效,默认值为false
139141
/// </summary>
140142
public bool IsDebugReceive { get; set; }
141143

142144
/// <summary>
143-
/// 是否打印接收的心跳数据
145+
/// 是否打印接收的心跳数据,只有在IsDebugReceive为true时有效,默认值为false
144146
/// </summary>
145147
public bool IsDebugReceiveHeartBeat { get; set; }
146148

@@ -197,22 +199,22 @@ public string ToFormatString()
197199
/// <summary>
198200
/// HTTP端口
199201
/// </summary>
200-
public int HttpPort { get; set; }
202+
public ushort HttpPort { get; set; }
201203

202204
/// <summary>
203205
/// HTTPS端口
204206
/// </summary>
205-
public int HttpsPort { get; set; }
207+
public ushort HttpsPort { get; set; }
206208

207209
/// <summary>
208210
/// WebSocket端口
209211
/// </summary>
210-
public int WsPort { get; set; }
212+
public ushort WsPort { get; set; }
211213

212214
/// <summary>
213215
/// WebSocket加密端口
214216
/// </summary>
215-
public int WssPort { get; set; }
217+
public ushort WssPort { get; set; }
216218

217219
/// <summary>
218220
/// Wss使用的证书路径
@@ -267,7 +269,7 @@ public string ToFormatString()
267269
/// <summary>
268270
/// 应用性能监控端口
269271
/// </summary>
270-
public int APMPort { get; set; }
272+
public ushort APMPort { get; set; }
271273

272274
/// <summary>
273275
/// 最大客户端数量

0 commit comments

Comments
 (0)