1- // ==========================================================================================
1+ // ==========================================================================================
22// GameFrameX 组织及其衍生项目的版权、商标、专利及其他相关权利
33// GameFrameX organization and its derivative projects' copyrights, trademarks, patents, and related rights
44// 均受中华人民共和国及相关国际法律法规保护。
3434namespace GameFrameX . StartUp . Abstractions ;
3535
3636/// <summary>
37- /// 程序启动器基类接口定义
37+ /// Application startup interface definition
3838/// </summary>
39+ /// <remarks>
40+ /// 程序启动器基类接口定义,定义了应用程序启动、停止和配置管理的基本契约
41+ /// </remarks>
3942public 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}
0 commit comments