1
0
mirror of https://github.com/chylex/Minecraft-Phantom-Panel.git synced 2024-11-23 19:42:51 +01:00
Minecraft-Phantom-Panel/Common/Phantom.Common.Data/Backups/BackupCreationResultKind.cs

25 lines
802 B
C#

namespace Phantom.Common.Data.Backups;
public enum BackupCreationResultKind : byte {
UnknownError = 0,
Success = 1,
InstanceNotRunning = 2,
BackupTimedOut = 3,
BackupCancelled = 4,
BackupAlreadyRunning = 5,
BackupFileAlreadyExists = 6,
CouldNotCreateBackupFolder = 7,
CouldNotCopyWorldToTemporaryFolder = 8,
CouldNotCreateWorldArchive = 9
}
public static class BackupCreationResultSummaryExtensions {
public static bool ShouldRetry(this BackupCreationResultKind kind) {
return kind != BackupCreationResultKind.Success &&
kind != BackupCreationResultKind.InstanceNotRunning &&
kind != BackupCreationResultKind.BackupCancelled &&
kind != BackupCreationResultKind.BackupAlreadyRunning &&
kind != BackupCreationResultKind.BackupFileAlreadyExists;
}
}