LANCommander/LANCommander.SDK/PowerShell/IScriptInterceptor.cs
Pat Hartl e6c12b4809 Refactor script debugging
Instead of providing delegates to a ScriptClient singleton, script execution now relies on dependency injection for debugging. This can be handled by registering an implementation of IScriptDebugger. Multiple script debuggers are supported. These changes required the creation of a PowerShellScriptFactory to handle DI of the service provider to the script.

In the case of LANCommander, "debugging" scripts really just gives an opportunity for the application to break after a script's execution and provide a poor-man's pty. This could be expanded upon in the future to hook directly into PowerShell's debugging functionality, but would require a substantial refactor to script execution.
2025-11-26 01:09:52 -06:00

8 lines
No EOL
164 B
C#

using System.Threading.Tasks;
namespace LANCommander.SDK.PowerShell;
public interface IScriptInterceptor
{
Task<bool> ExecuteAsync(PowerShellScript script);
}