示例#1
0
        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);
        }
示例#2
0
        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;
        }