public static ProcessHelper.ProcessExecutionResult ExecuteProcess(string workingDirectory, string tool, List <string> arguments) { ProcessHelper.ProcessExecutionResult result = new ProcessHelper.ProcessExecutionResult(); using (XilinxProcess process = new XilinxProcess(tool, arguments)) { StringProcessListener listener = new StringProcessListener(); process.Listeners.Add(listener); process.WorkingDirectory = workingDirectory; process.Start(); process.WaitForExit(); result.StandardError = listener.ErrorOutput; result.StandardOutput = listener.Output; } return(result); }
public static ProcessHelper.ProcessExecutionResult ExecuteProcess(string workingDirectory, string tool, List<string> arguments) { ProcessHelper.ProcessExecutionResult result = new ProcessHelper.ProcessExecutionResult(); using (XilinxProcess process = new XilinxProcess(tool, arguments)) { StringProcessListener listener = new StringProcessListener(); process.Listeners.Add(listener); process.WorkingDirectory = workingDirectory; process.Start(); process.WaitForExit(); result.StandardError = listener.ErrorOutput; result.StandardOutput = listener.Output; } return result; }