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

26 lines
781 B
C#

using InnovEnergy.Lib.SysTools.Process;
namespace InnovEnergy.Lib.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);
}
}