Files
netch/Netch/Models/State.cs
ChsBuffer ac0800ec56 Reformat
2021-02-20 18:15:16 +08:00

49 lines
929 B
C#

namespace Netch.Models
{
/// <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();
}
}
}