Beispiel #1
0
    public void Kill(int pid)
    {
        var process = _repository.GetByPid(pid);

        if (process == null)
        {
            throw new InvalidOperationException($"Cannot find process with pid {pid}");
        }
        process.Kill();
        _repository.Remove(pid);
    }