コード例 #1
0
        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);
        }
コード例 #2
0
        public List <string> GetCmdLine(int pid)
        {
            var specificDelimiterReader = new SpecificDelimiterTextReader();

            ProcFs.TryReadCommandLine(pid, out var cmdLine, specificDelimiterReader);
            return(cmdLine);
        }
コード例 #3
0
 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));
 }