26 lines
773 B
C#
26 lines
773 B
C#
|
using InnovEnergy.SysTools.Process;
|
||
|
|
||
|
namespace InnovEnergy.SysTools.Edges;
|
||
|
|
||
|
using Env = Dictionary<String, String>;
|
||
|
|
||
|
|
||
|
public static class StringToProcess
|
||
|
{
|
||
|
|
||
|
public static ProcessResult ExecuteBlocking(this String command, Env variables = null, Boolean logToConsole = false)
|
||
|
{
|
||
|
return SysCommandToProcess.ExecuteBlocking(command, variables, logToConsole);
|
||
|
}
|
||
|
|
||
|
public static AsyncProcess ToAsyncProcess(this String command, Env variables = null, Boolean logToConsole = false)
|
||
|
{
|
||
|
return new AsyncProcess(command, variables, logToConsole);
|
||
|
}
|
||
|
|
||
|
public static SyncProcess ToSyncProcess(this String command, Env variables = null, Boolean logToConsole = false)
|
||
|
{
|
||
|
return new SyncProcess(command, variables, logToConsole);
|
||
|
}
|
||
|
|
||
|
}
|