mirror of
https://github.com/Stone-Red-Code/RemSox.git
synced 2026-09-07 15:56:31 +02:00
Refactor CLI command system to support async execution and central command history
This commit is contained in:
@@ -9,7 +9,7 @@ public class ViewProcessLogs : ICommand
|
||||
|
||||
public string Description => "View logs for a process";
|
||||
|
||||
public void Execute(string? arguments, Action<string> printLine)
|
||||
public Task ExecuteAsync(string? arguments, Action<string> printLine)
|
||||
{
|
||||
if (int.TryParse(arguments, out int processId))
|
||||
{
|
||||
@@ -21,6 +21,7 @@ public class ViewProcessLogs : ICommand
|
||||
IEnumerable<LogEntry> logs = ProcessManager.GetLogs();
|
||||
PrintLogs(logs, printLine);
|
||||
}
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
private static void PrintLogs(IEnumerable<LogEntry> logs, Action<string> printLine)
|
||||
|
||||
Reference in New Issue
Block a user