using System.Threading.Tasks; namespace LANCommander.Launcher.Services; /// /// Describes how to re-launch the launcher as a minimal, elevated process that runs a single script /// with the supplied runtime parameters and then exits. /// public class ElevatedProcessRequest { /// The launcher executable to invoke elevated. public required string FileName { get; init; } /// The formatted command line (RunScript verb + options) passed to the elevated process. public required string Arguments { get; init; } /// The working directory the elevated script should run in. public string? WorkingDirectory { get; init; } } /// /// Launches an elevated process and waits for it to finish. Abstracted so the interceptor's /// wait-for-completion behavior can be tested without spawning a real UAC-elevated process. /// public interface IElevatedProcessLauncher { /// /// Starts the elevated process described by and completes only once /// that process has exited. /// Task LaunchAndWaitAsync(ElevatedProcessRequest request); }