IProcess.cs 534 B

123456789101112131415161718192021
  1. using System;
  2. using System.IO;
  3. using System.Threading.Tasks;
  4. namespace MediaBrowser.Model.Diagnostics
  5. {
  6. public interface IProcess : IDisposable
  7. {
  8. event EventHandler Exited;
  9. void Kill();
  10. bool WaitForExit(int timeMs);
  11. Task<bool> WaitForExitAsync(int timeMs);
  12. int ExitCode { get; }
  13. void Start();
  14. StreamWriter StandardInput { get; }
  15. StreamReader StandardError { get; }
  16. StreamReader StandardOutput { get; }
  17. ProcessOptions StartInfo { get; }
  18. }
  19. }