|
|
|
@ -12,6 +12,7 @@ namespace NzbDrone.Common.Processes
|
|
|
|
|
{
|
|
|
|
|
public interface IProcessProvider
|
|
|
|
|
{
|
|
|
|
|
int GetCurrentProcessId();
|
|
|
|
|
ProcessInfo GetCurrentProcess();
|
|
|
|
|
ProcessInfo GetProcessById(int id);
|
|
|
|
|
List<ProcessInfo> FindProcessByName(string name);
|
|
|
|
@ -40,6 +41,11 @@ namespace NzbDrone.Common.Processes
|
|
|
|
|
_logger = logger;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int GetCurrentProcessId()
|
|
|
|
|
{
|
|
|
|
|
return Process.GetCurrentProcess().Id;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public ProcessInfo GetCurrentProcess()
|
|
|
|
|
{
|
|
|
|
|
return ConvertToProcessInfo(Process.GetCurrentProcess());
|
|
|
|
|