Innovenergy_trunk/csharp/lib/SysTools/Edges/StringToProcess.cs

26 lines
773 B
C#
Raw Normal View History

2023-02-16 12:57:06 +00:00
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);
}
}