Skip to content

Commit cc3fb69

Browse files
committed
docs(StartUp): 更新接口文档注释为双语格式
将IFetalExceptionExitHandler和IAppStartUp接口的文档注释更新为中英双语格式,包括方法参数和返回值的详细说明,以及异常和备注信息
1 parent 86f1edf commit cc3fb69

File tree

2 files changed

+52
-19
lines changed

2 files changed

+52
-19
lines changed

GameFrameX.StartUp/Abstractions/IAppStartUp.cs

Lines changed: 39 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// ==========================================================================================
1+
// ==========================================================================================
22
// GameFrameX 组织及其衍生项目的版权、商标、专利及其他相关权利
33
// GameFrameX organization and its derivative projects' copyrights, trademarks, patents, and related rights
44
// 均受中华人民共和国及相关国际法律法规保护。
@@ -34,42 +34,68 @@
3434
namespace GameFrameX.StartUp.Abstractions;
3535

3636
/// <summary>
37-
/// 程序启动器基类接口定义
37+
/// Application startup interface definition
3838
/// </summary>
39+
/// <remarks>
40+
/// 程序启动器基类接口定义,定义了应用程序启动、停止和配置管理的基本契约
41+
/// </remarks>
3942
public interface IAppStartUp
4043
{
4144
/// <summary>
42-
/// 应用退出
45+
/// Gets the application exit token
4346
/// </summary>
47+
/// <value>A task that represents the application exit token</value>
48+
/// <remarks>
49+
/// 应用退出令牌,用于监控应用程序的退出状态
50+
/// </remarks>
4451
Task<string> AppExitToken { get; }
4552

4653
/// <summary>
47-
/// 服务器类型
54+
/// Gets the server type
4855
/// </summary>
56+
/// <value>The type identifier of the server</value>
57+
/// <remarks>
58+
/// 服务器类型标识符,用于区分不同类型的服务器实例
59+
/// </remarks>
4960
string ServerType { get; }
5061

5162
/// <summary>
52-
/// 配置信息
63+
/// Gets the application configuration settings
5364
/// </summary>
65+
/// <value>The application settings instance</value>
66+
/// <remarks>
67+
/// 配置信息,包含应用程序运行所需的各种配置参数
68+
/// </remarks>
5469
AppSetting Setting { get; }
5570

5671
/// <summary>
57-
/// 初始化
72+
/// Initializes the application startup with specified parameters
5873
/// </summary>
59-
/// <param name="serverType">服务器类型</param>
60-
/// <param name="setting">启动设置</param>
61-
/// <param name="args">启动参数</param>
62-
/// <returns></returns>
74+
/// <param name="serverType">The type of server to initialize / 服务器类型</param>
75+
/// <param name="setting">The application settings / 启动设置</param>
76+
/// <param name="args">The startup arguments / 启动参数</param>
77+
/// <returns>True if initialization is successful; otherwise, false / 初始化成功返回true,否则返回false</returns>
78+
/// <remarks>
79+
/// 初始化应用程序启动器,设置服务器类型、配置信息和启动参数
80+
/// </remarks>
6381
bool Init(string serverType, AppSetting setting, string[] args);
6482

6583
/// <summary>
66-
/// 启动
84+
/// Starts the application asynchronously
6785
/// </summary>
86+
/// <returns>A task that represents the asynchronous start operation / 表示异步启动操作的任务</returns>
87+
/// <remarks>
88+
/// 异步启动应用程序,执行所有必要的初始化和服务启动流程
89+
/// </remarks>
6890
Task StartAsync();
6991

7092
/// <summary>
71-
/// 终止服务器
93+
/// Stops the server asynchronously with an optional message
7294
/// </summary>
73-
/// <param name="message">终止原因</param>
95+
/// <param name="message">The reason for stopping the server / 终止原因</param>
96+
/// <returns>A task that represents the asynchronous stop operation / 表示异步停止操作的任务</returns>
97+
/// <remarks>
98+
/// 异步终止服务器,执行清理和资源释放操作
99+
/// </remarks>
74100
Task StopAsync(string message = "");
75101
}

GameFrameX.StartUp/Abstractions/IFetalExceptionExitHandler.cs

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// ==========================================================================================
1+
// ==========================================================================================
22
// GameFrameX 组织及其衍生项目的版权、商标、专利及其他相关权利
33
// GameFrameX organization and its derivative projects' copyrights, trademarks, patents, and related rights
44
// 均受中华人民共和国及相关国际法律法规保护。
@@ -34,15 +34,22 @@
3434
namespace GameFrameX.StartUp.Abstractions;
3535

3636
/// <summary>
37-
/// 程序异常退出的执行器
37+
/// Fatal exception exit handler interface definition
3838
/// </summary>
39+
/// <remarks>
40+
/// 程序异常退出的执行器接口定义,用于处理应用程序遇到致命异常时的退出逻辑
41+
/// </remarks>
3942
public interface IFetalExceptionExitHandler
4043
{
4144
/// <summary>
42-
/// 执行
45+
/// Executes the fatal exception exit handling logic
4346
/// </summary>
44-
/// <param name="tag">标签</param>
45-
/// <param name="setting">服务器设置</param>
46-
/// <param name="message">退出原因</param>
47+
/// <param name="tag">The tag identifier / 标签</param>
48+
/// <param name="setting">The application settings / 服务器设置</param>
49+
/// <param name="message">The exit reason message / 退出原因</param>
50+
/// <remarks>
51+
/// 执行致命异常退出处理逻辑,包括日志记录、资源清理和优雅关闭等操作
52+
/// </remarks>
53+
/// <exception cref="ArgumentNullException">Thrown when any parameter is null / 当任何参数为null时抛出</exception>
4754
void Run(string tag, AppSetting setting, string message);
4855
}

0 commit comments

Comments
 (0)