コード例 #1
0
 public CloneRepoJob(
     string exec,
     string repoDir,
     string repoName,
     Uri repoUrl,
     JobOutputHandler handler
     ) : base(exec, $"clone {repoUrl} {repoName}", repoDir, handler)
 {
 }
コード例 #2
0
 public Job(string exec, string args, string dir, JobOutputHandler handler)
 {
     _process = new Process();
     _process.StartInfo.FileName               = exec;
     _process.StartInfo.Arguments              = args;
     _process.StartInfo.WorkingDirectory       = dir;
     _process.StartInfo.UseShellExecute        = false;
     _process.StartInfo.RedirectStandardOutput = true;
     _process.StartInfo.RedirectStandardError  = true;
     _process.EnableRaisingEvents              = true;
     _process.OutputDataReceived              += handler.OutputDataReceived;
     _process.ErrorDataReceived += handler.ErrorDataReceived;
     _process.Exited            += Exited;
     _process.Exited            += handler.Exited;
 }