public IDictionary <string, string> GetEnvironmentVariables(int pid, Func <KeyValuePair <string, string>, bool> predicate)
        {
            var specificDelimiterReader = new SpecificDelimiterTextReader();

            ProcFs.TryReadEnvironFile(pid, out var environmentVariables, predicate, specificDelimiterReader);
            return(environmentVariables);
        }
        public List <string> GetCmdLine(int pid)
        {
            var specificDelimiterReader = new SpecificDelimiterTextReader();

            ProcFs.TryReadCommandLine(pid, out var cmdLine, specificDelimiterReader);
            return(cmdLine);
        }
 private static ProcessInfo CreateProcessInfo(int pid, ReusableTextReader reusableReader = null)
 {
     if (reusableReader == null)
     {
         reusableReader = new ReusableTextReader();
     }
     if (!ProcFs.TryReadStatusFile(pid, out var result, reusableReader))
     {
         return(null);
     }
     ProcFs.TryReadExeFile(pid, out var exe);
     ProcFs.TryReadCreationTime(pid, out var startTime);
     return(CreateProcessInfo(result, exe, startTime));
 }