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

26 lines
781 B
C#
Raw Normal View History

using InnovEnergy.Lib.SysTools.Process;
2023-02-16 12:57:06 +00:00
namespace InnovEnergy.Lib.SysTools.Edges;
2023-02-16 12:57:06 +00:00
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);
}
}