mirror of
https://github.com/chylex/Minecraft-Phantom-Panel.git
synced 2024-11-23 19:42:51 +01:00
38 lines
916 B
C#
38 lines
916 B
C#
using System.Collections.ObjectModel;
|
|
using System.Diagnostics;
|
|
|
|
namespace Phantom.Utils.Processes;
|
|
|
|
public sealed class ProcessConfigurator {
|
|
private readonly ProcessStartInfo startInfo = new () {
|
|
RedirectStandardOutput = true,
|
|
RedirectStandardError = true
|
|
};
|
|
|
|
public string FileName {
|
|
get => startInfo.FileName;
|
|
set => startInfo.FileName = value;
|
|
}
|
|
|
|
public Collection<string> ArgumentList => startInfo.ArgumentList;
|
|
|
|
public string WorkingDirectory {
|
|
get => startInfo.WorkingDirectory;
|
|
set => startInfo.WorkingDirectory = value;
|
|
}
|
|
|
|
public bool RedirectInput {
|
|
get => startInfo.RedirectStandardInput;
|
|
set => startInfo.RedirectStandardInput = value;
|
|
}
|
|
|
|
public bool UseShellExecute {
|
|
get => startInfo.UseShellExecute;
|
|
set => startInfo.UseShellExecute = value;
|
|
}
|
|
|
|
public Process CreateProcess() {
|
|
return new Process(new System.Diagnostics.Process { StartInfo = startInfo });
|
|
}
|
|
}
|