1
0
mirror of https://github.com/chylex/Minecraft-Phantom-Panel.git synced 2025-05-13 17:34:03 +02:00

Move StopProcedureException into Phantom.Utils.Runtime project

This commit is contained in:
chylex 2022-10-21 13:59:49 +02:00
parent 59cf71e3e1
commit 8d3e4442d7
Signed by: chylex
GPG Key ID: 4DE42C8F19A80548
4 changed files with 13 additions and 12 deletions
Agent/Phantom.Agent.Minecraft/Server
Common/Phantom.Common.Minecraft
Utils/Phantom.Utils.Runtime

View File

@ -3,6 +3,7 @@ using Phantom.Common.Logging;
using Phantom.Common.Minecraft;
using Phantom.Utils.Cryptography;
using Phantom.Utils.IO;
using Phantom.Utils.Runtime;
using Serilog;
namespace Phantom.Agent.Minecraft.Server;
@ -175,10 +176,4 @@ sealed class MinecraftServerExecutableDownloader {
streamCopier.Dispose();
}
}
private sealed class StopProcedureException : Exception {
public static StopProcedureException Instance { get; } = new ();
private StopProcedureException() {}
}
}

View File

@ -6,6 +6,7 @@ using Phantom.Common.Data.Minecraft;
using Phantom.Common.Logging;
using Phantom.Utils.Cryptography;
using Phantom.Utils.IO;
using Phantom.Utils.Runtime;
using Serilog;
namespace Phantom.Common.Minecraft;
@ -197,10 +198,4 @@ public sealed class MinecraftVersions : IDisposable {
return valueElement;
}
private sealed class StopProcedureException : Exception {
public static StopProcedureException Instance { get; } = new ();
private StopProcedureException() {}
}
}

View File

@ -8,6 +8,7 @@
<ItemGroup>
<ProjectReference Include="..\..\Utils\Phantom.Utils.IO\Phantom.Utils.IO.csproj" />
<ProjectReference Include="..\..\Utils\Phantom.Utils.Runtime\Phantom.Utils.Runtime.csproj" />
<ProjectReference Include="..\Phantom.Common.Data\Phantom.Common.Data.csproj" />
<ProjectReference Include="..\Phantom.Common.Logging\Phantom.Common.Logging.csproj" />
</ItemGroup>

View File

@ -0,0 +1,10 @@
namespace Phantom.Utils.Runtime;
/// <summary>
/// Custom exception used to signal a procedure should stop. This exception should not be logged or propagated.
/// </summary>
public sealed class StopProcedureException : Exception {
public static StopProcedureException Instance { get; } = new ();
private StopProcedureException() {}
}