diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-10-31 23:07:45 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-10-31 23:07:45 -0400 |
| commit | 13d8110ce29a7d976c3e88dc4b330922964ac11a (patch) | |
| tree | ddc2a61bfd9d001224aa640e220c7903ac62cb74 /MediaBrowser.Model/Diagnostics | |
| parent | b28857feea210a40f984e69517bcbafbfb639773 (diff) | |
make api project portable
Diffstat (limited to 'MediaBrowser.Model/Diagnostics')
| -rw-r--r-- | MediaBrowser.Model/Diagnostics/IProcess.cs | 19 | ||||
| -rw-r--r-- | MediaBrowser.Model/Diagnostics/IProcessFactory.cs | 27 |
2 files changed, 46 insertions, 0 deletions
diff --git a/MediaBrowser.Model/Diagnostics/IProcess.cs b/MediaBrowser.Model/Diagnostics/IProcess.cs new file mode 100644 index 0000000000..ab0b0cfcff --- /dev/null +++ b/MediaBrowser.Model/Diagnostics/IProcess.cs @@ -0,0 +1,19 @@ +using System; +using System.IO; + +namespace MediaBrowser.Model.Diagnostics +{ + public interface IProcess : IDisposable + { + event EventHandler Exited; + + void Kill(); + bool WaitForExit(int timeMs); + int ExitCode { get; } + void Start(); + StreamWriter StandardInput { get; } + StreamReader StandardError { get; } + StreamReader StandardOutput { get; } + ProcessOptions StartInfo { get; } + } +} diff --git a/MediaBrowser.Model/Diagnostics/IProcessFactory.cs b/MediaBrowser.Model/Diagnostics/IProcessFactory.cs new file mode 100644 index 0000000000..998bbcd28d --- /dev/null +++ b/MediaBrowser.Model/Diagnostics/IProcessFactory.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MediaBrowser.Model.Diagnostics +{ + public interface IProcessFactory + { + IProcess Create(ProcessOptions options); + } + + public class ProcessOptions + { + public String FileName { get; set; } + public String Arguments { get; set; } + public String WorkingDirectory { get; set; } + public bool CreateNoWindow { get; set; } + public bool UseShellExecute { get; set; } + public bool EnableRaisingEvents { get; set; } + public bool ErrorDialog { get; set; } + public bool RedirectStandardError { get; set; } + public bool RedirectStandardInput { get; set; } + public bool IsHidden { get; set; } + } +} |
