Changed project names

This commit is contained in:
Marco Batzinger 2021-01-22 10:55:33 +01:00
parent b4c4aa4010
commit a29e57e66d
130 changed files with 501 additions and 504 deletions

View file

@ -1,47 +0,0 @@
using JetBrains.Annotations;
using System;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Linq;
using VirtualPrinter.Agent.Core;
using VirtualPrinter.ProgressInfo.Lib.Interfaces;
using VirtualPrinter.Utils;
namespace VirtualPrinter.ProgressInfo.Lib
{
[ExcludeFromCodeCoverage]
public class ProgressInfoProcessManager : IProgressInfoProcessManager
{
private const string ProcessName = "VPDAgentProgress";
public bool IsRunning()
{
return Process.GetProcesses().Any(pList => pList.ProcessName.Contains(ProcessName));
}
public void Run([NotNull]IJob job)
{
if (job == null)
{
throw new ArgumentNullException(nameof(job));
}
var path = Path.GetDirectoryName(typeof(ProgressInfoProcessManager).Assembly.Location);
var file = Path.Combine(path, ProcessName + ".exe");
new Shell().Execute(job.JobInfo, job.SessionInfo, file, null);
}
public void Stop()
{
var processes = Process.GetProcesses().Where(pList => pList.ProcessName.Contains(ProcessName));
foreach(var process in processes)
{
process.Kill();
}
}
}
}