1
0
mirror of https://github.com/chylex/Minecraft-Phantom-Panel.git synced 2025-04-28 10:15:47 +02:00

Unify enums used for result messages

This commit is contained in:
chylex 2023-01-30 08:17:56 +01:00
parent 4c66193b6e
commit e40459a039
Signed by: chylex
GPG Key ID: 4DE42C8F19A80548
5 changed files with 10 additions and 10 deletions
Common/Phantom.Common.Data
Server/Phantom.Server.Services/Instances

View File

@ -1,6 +1,6 @@
namespace Phantom.Common.Data.Instance;
public enum InstanceLaunchFailReason {
public enum InstanceLaunchFailReason : byte {
UnknownError,
ServerPortNotAllowed,
ServerPortAlreadyInUse,

View File

@ -1,11 +1,11 @@
namespace Phantom.Common.Data.Replies;
public enum LaunchInstanceResult : byte {
UnknownError,
LaunchInitiated,
InstanceAlreadyLaunching,
InstanceAlreadyRunning,
InstanceIsStopping,
UnknownError
InstanceIsStopping
}
public static class LaunchInstanceResultExtensions {

View File

@ -1,8 +1,8 @@
namespace Phantom.Common.Data.Replies;
public enum SendCommandToInstanceResult : byte {
Success,
UnknownError
UnknownError,
Success
}
public static class SendCommandToInstanceResultExtensions {

View File

@ -1,10 +1,10 @@
namespace Phantom.Common.Data.Replies;
public enum StopInstanceResult : byte {
UnknownError,
StopInitiated,
InstanceAlreadyStopping,
InstanceAlreadyStopped,
UnknownError
InstanceAlreadyStopped
}
public static class StopInstanceResultExtensions {

View File

@ -1,14 +1,14 @@
namespace Phantom.Server.Services.Instances;
public enum AddInstanceResult {
public enum AddInstanceResult : byte {
UnknownError,
Success,
InstanceAlreadyExists,
InstanceNameMustNotBeEmpty,
InstanceMemoryMustNotBeZero,
AgentNotFound,
AgentInstanceLimitExceeded,
AgentMemoryLimitExceeded,
UnknownError
AgentMemoryLimitExceeded
}
public static class AddInstanceResultExtensions {