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

56 lines
1.3 KiB
C#

namespace InnovEnergy.Lib.SysTools.Edges;
public static class StringToCommand
{
public static SysCommand ToCommand(this String cmd) => new SysCommand(cmd);
public static SysCommand Opt1(this String cmd, String option)
{
return cmd
.ToCommand()
.Opt1(option);
}
public static SysCommand Opt1(this String cmd, String option, Object value, String separator = " ")
{
return cmd
.ToCommand()
.Opt1(option, value, separator);
}
public static SysCommand Opt2(this String cmd, String option)
{
return cmd
.ToCommand()
.Opt2(option);
}
public static SysCommand Opt2(this String cmd, String option, Object value, String separator = "=")
{
return cmd
.ToCommand()
.Opt2(option, value, separator);
}
public static SysCommand Opt(this String cmd, String option)
{
return cmd
.ToCommand()
.Opt(option);
}
public static SysCommand Opt(this String cmd, String option, Object value)
{
return cmd
.ToCommand()
.Opt(option, value);
}
public static SysCommand Arg(this String cmd, Object argument)
{
return cmd
.ToCommand()
.Arg(argument);
}
}