Process gitProcess = new Process(); gitProcess.StartInfo.FileName = // path for common batch file gitProcess.StartInfo.Arguments = "--login -i"; gitProcess.StartInfo.CreateNoWindow = true; gitProcess.StartInfo.UseShellExecute = false; gitProcess.StartInfo.RedirectStandardOutput = true; gitProcess.StartInfo.RedirectStandardError = true; gitProcess.StartInfo.RedirectStandardInput = true; gitProcess.StartInfo.WorkingDirectory = selectedRepoOption; var output = new StringBuilder(); string[] finaloutput; using (var outputWaitHandle = new AutoResetEvent(false)) { gitProcess.OutputDataReceived += (outputsender, e1) => { // attach event handler if (e1.Data == null) { outputWaitHandle.Set(); } else if (e1.Data.EndsWith("xml")) { output.AppendLine(e1.Data + "#"); } };
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)