Пример #1
0
 private static Process GetParent(Process process)
 {
     return(ProccessService.FindPidFromIndexedProcessName(ProccessService.FindIndexedProcessName(process.Id)));
 }
Пример #2
0
        public static int GetVisualStudioId()
        {
            Process currentProcess = Process.GetCurrentProcess();

            return(!(currentProcess.ProcessName == "devenv") ? ProccessService.GetParent(currentProcess).Id : currentProcess.Id);
        }