public List <SnapOsProcess> GetProcesses() { var processes = EnumerateProcesses().Select(x => { var processNameValid = !string.IsNullOrWhiteSpace(x.processName); return(OsProcessManager.Build(x.pid, x.processName, !processNameValid ? null : Filesystem.PathGetDirectoryName(x.processName), !processNameValid ? null : Filesystem.PathGetFileName(x.processName))); }).ToList(); return(processes); }
public List <SnapOsProcess> GetProcesses() { var processes = Process.GetProcesses().Select(process => OsProcessManager.Build(process.Id, process.ProcessName)).ToList(); return(processes); }