예제 #1
0
        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);
        }
예제 #2
0
파일: SnapOS.Unix.cs 프로젝트: peters/snapx
        public List <SnapOsProcess> GetProcesses()
        {
            var processes = Process.GetProcesses().Select(process => OsProcessManager.Build(process.Id, process.ProcessName)).ToList();

            return(processes);
        }