mirror of
https://github.com/chylex/Minecraft-Phantom-Panel.git
synced 2026-01-12 17:58:15 +01:00
18 lines
544 B
C#
18 lines
544 B
C#
namespace Phantom.Common.Data.Web.Agent;
|
|
|
|
public enum CreateOrUpdateAgentResult : byte {
|
|
UnknownError,
|
|
Success,
|
|
AgentNameMustNotBeEmpty,
|
|
}
|
|
|
|
public static class CreateOrUpdateAgentResultExtensions {
|
|
public static string ToSentence(this CreateOrUpdateAgentResult reason) {
|
|
return reason switch {
|
|
CreateOrUpdateAgentResult.Success => "Success.",
|
|
CreateOrUpdateAgentResult.AgentNameMustNotBeEmpty => "Agent name must not be empty.",
|
|
_ => "Unknown error.",
|
|
};
|
|
}
|
|
}
|