mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-23 02:24:44 +01:00
Remove unnecessary CommonProcess abstraction
This commit is contained in:
@@ -1,23 +0,0 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MediaBrowser.Model.Diagnostics
|
||||
{
|
||||
public interface IProcess : IDisposable
|
||||
{
|
||||
event EventHandler Exited;
|
||||
|
||||
void Kill();
|
||||
bool WaitForExit(int timeMs);
|
||||
Task<bool> WaitForExitAsync(int timeMs);
|
||||
int ExitCode { get; }
|
||||
void Start();
|
||||
StreamWriter StandardInput { get; }
|
||||
StreamReader StandardError { get; }
|
||||
StreamReader StandardOutput { get; }
|
||||
ProcessOptions StartInfo { get; }
|
||||
}
|
||||
}
|
||||
@@ -1,24 +1,11 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System.Diagnostics;
|
||||
|
||||
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 RedirectStandardOutput { get; set; }
|
||||
public bool IsHidden { get; set; }
|
||||
Process Create(ProcessStartInfo options);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user