mirror of
https://github.com/bolucat/Archive.git
synced 2025-10-18 22:15:12 +08:00
48 lines
770 B
C#
48 lines
770 B
C#
namespace Netch.Enums;
|
|
|
|
/// <summary>
|
|
/// 状态
|
|
/// </summary>
|
|
public enum State
|
|
{
|
|
/// <summary>
|
|
/// 等待命令中
|
|
/// </summary>
|
|
Waiting,
|
|
|
|
/// <summary>
|
|
/// 正在启动中
|
|
/// </summary>
|
|
Starting,
|
|
|
|
/// <summary>
|
|
/// 已启动
|
|
/// </summary>
|
|
Started,
|
|
|
|
/// <summary>
|
|
/// 正在停止中
|
|
/// </summary>
|
|
Stopping,
|
|
|
|
/// <summary>
|
|
/// 已停止
|
|
/// </summary>
|
|
Stopped,
|
|
|
|
/// <summary>
|
|
/// 退出中
|
|
/// </summary>
|
|
Terminating
|
|
}
|
|
|
|
public static class StateExtension
|
|
{
|
|
public static string GetStatusString(State state)
|
|
{
|
|
if (state == State.Waiting)
|
|
return "Waiting for command";
|
|
|
|
return state.ToString();
|
|
}
|
|
} |