public CPboParameter(string[] args) { if (args == null) { throw new ArgumentNullException(nameof(args)); } if (args.Length != 3) { throw new ArgumentException($"Need 3 Parameters. Ex: [ExePath] [Mode(-e/-p)] [InputPath]"); } this.ExePath = LoadPath(args[0]?.Trim('"')); this.Mode = CPboModeUtility.GetMode(args[1]); var ioPath = LoadIOPath(args[2], this.Mode); this.InputPath = ioPath.Item1; this.OutputPath = ioPath.Item2; }
public ProcessStartInfo GetProcessStartInfo() => new ProcessStartInfo(this.ExePath, $"{CPboModeUtility.GetCommandString(this.Mode)} \"{this.InputPath}\" \"{this.OutputPath}\"");