Remove unnecessary CommonProcess abstraction

This commit is contained in:
Mark Monteiro
2020-03-27 00:10:16 +01:00
parent 10050a55a5
commit ee2f911a2b
10 changed files with 120 additions and 241 deletions

View File

@@ -1727,15 +1727,15 @@ namespace Emby.Server.Implementations
throw new NotSupportedException();
}
var process = ProcessFactory.Create(new ProcessOptions
var process = ProcessFactory.Create(new ProcessStartInfo
{
FileName = url,
EnableRaisingEvents = true,
UseShellExecute = true,
ErrorDialog = false
});
process.Exited += ProcessExited;
process.EnableRaisingEvents = true;
process.Exited += (sender, args) => ((Process)sender).Dispose(); ;
try
{
@@ -1748,11 +1748,6 @@ namespace Emby.Server.Implementations
}
}
private static void ProcessExited(object sender, EventArgs e)
{
((IProcess)sender).Dispose();
}
public virtual void EnableLoopback(string appName)
{
}