Implementation of script debugger component with RPC via SignalR

This commit is contained in:
Pat Hartl 2025-12-10 20:55:38 -06:00
parent f242f66813
commit 17fa802c19
19 changed files with 516 additions and 62 deletions

View file

@ -0,0 +1,17 @@
using System;
using System.Threading.Tasks;
namespace LANCommander.SDK.PowerShell;
public class PowerShellDebugContext(System.Management.Automation.PowerShell ps) : IScriptDebugContext
{
public Guid SessionId { get; set; } = Guid.NewGuid();
public async Task ExecuteAsync(string script)
{
ps.Commands.Clear();
ps.AddScript(script);
await ps.InvokeAsync().ConfigureAwait(false);
}
}