Пример #1
0
        /// <summary>
        /// Finds the node processes whose executables are in the specified directory.
        /// <para>Bolj tocna metoda kot pa <see cref="GetNodeProcessesByTime"/>, ampak pocasnejsa.</para>
        /// </summary>
        /// <param name="executablesDirectory">The directory of the NodeJs executables.</param>
        private static List <Process> GetNodeProcessesByExecutablePath(string executablesDirectory)
        {
            var allNodeProcesses = Process.GetProcessesByName("node");

            string nodeExecutablePath = Path.Combine(executablesDirectory, "node.exe").ToLower();

            List <Process> result = allNodeProcesses.Where(p => ProcessUtility.GetProcessPath(p).ToLower() == nodeExecutablePath).ToList();

            return(result);
        }