Пример #1
0
 public ProcessStatus GetProcessStatus(RunnableProcess process)
 {
     if (process == null)
     {
         throw new ArgumentNullException(nameof(process));
     }
     return(process.Status);
 }
Пример #2
0
        public Task <RunnableProcess> RunProcessAsync(ProcessConfiguration configuration)
        {
            var process = new RunnableProcess(configuration);

            process.CreateProcess();
            ProcessList.Add(process);

            var task = new Task <RunnableProcess>(() => RunProcess(process));

            task.Start();
            return(task);
        }
Пример #3
0
 private RunnableProcess RunProcess(RunnableProcess process)
 {
     process.Process.Start();
     return(process);
 }
Пример #4
0
 public void KillProcess(RunnableProcess process)
 {
     process.Process.Kill();
 }