Re-implemented server state machine. Cleaned up code
TODO: Handle trigger errors
This commit is contained in:
13
MoonlightServers.Daemon/Abstractions/Server.Stop.cs
Normal file
13
MoonlightServers.Daemon/Abstractions/Server.Stop.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using MoonlightServers.Daemon.Enums;
|
||||
|
||||
namespace MoonlightServers.Daemon.Abstractions;
|
||||
|
||||
public partial class Server
|
||||
{
|
||||
public async Task Stop() => await StateMachine.FireAsync(ServerTrigger.Stop);
|
||||
|
||||
private async Task InternalStop()
|
||||
{
|
||||
await Console.WriteToInput($"{Configuration.StopCommand}\n\r");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user