Пример #1
0
 /// <summary>
 /// Kills all processes in the <see cref="nodeProcesses"/> list.
 /// </summary>
 private void KillAllNodeProcesses()
 {
     if (nodeProcesses == null)
     {
         return;
     }
     ProcessUtility.KillAllProcesses(nodeProcesses);
     nodeProcesses = null;
 }
Пример #2
0
        /// <summary>
        /// Kills all processes (if any exist) that use the same executables as this instance of <see cref="NodeJsServer"/>.
        /// </summary>
        private void KillAllProcesssesOfThisNodeExecutables()
        {
            // look for any running node processes in that directory
            List <Process> nodeProcessesAlreadyRunning = GetNodeProcessesByExecutablePath(ExecutablesDirectory);

            // ... and kill them if they exist
            if (!nodeProcessesAlreadyRunning.IsNullOrEmpty())
            {
                ProcessUtility.KillAllProcesses(nodeProcessesAlreadyRunning);
            }
        }