Files
RemSox/UI/CLI/Commands/YesNtCommand.cs
T
2026-06-12 15:18:02 +02:00

24 lines
623 B
C#

using RemSox.Processing;
namespace RemSox.UI.CLI.Commands;
public class YesNtCommand : ICommand
{
public string Name => "yesnt";
public string Description => "Start the YesNt interpreter";
private int processId;
public async Task ExecuteAsync(string? arguments, Action<string> printLine)
{
processId = ProcessManager.SpawnProcess<Processes.YesNtInterpreterProcess>(arguments?.Split(',') ?? []);
await ProcessManager.WaitForProcessExitAsync(processId);
}
public Task StopAsync()
{
ProcessManager.StopProcess(processId);
return Task.CompletedTask;
}
}