/// <summary>
 /// Method to end a process
 /// </summary>
 /// <param name="processName"></param>
 /// <returns></returns>
 public ProcessReturnCode TerminateProcess(string processName)
 {
     return(ProcessManagementHelper.KillProcess(connectionScope, processName));
 }
        /// <summary>
        /// Returns a list of properties for a given process
        /// </summary>
        /// <param name="processName"></param>
        /// <returns></returns>
        public List <string> ProcessProperties(string processName)
        {
            var processProperties = ProcessManagementHelper.ProcessProperties(connectionScope, processName);

            return(processProperties);
        }
 /// <summary>
 /// Method to start a process
 /// </summary>
 /// <param name="process"></param>
 /// <returns></returns>
 public ProcessReturnCode CreateProcess(Process process)
 {
     return(ProcessManagementHelper.StartProcess(Environment.MachineName, process.DirPath, process.Command));
 }
        /// <summary>
        /// Returns if the process is running,stopped or errored
        /// </summary>
        /// <param name="process"></param>
        /// <returns></returns>
        public ProcessState GetProcessState(Process process)
        {
            var isProcessRunning = ProcessManagementHelper.IsProcessRunning(connectionScope, process.Name);

            return(isProcessRunning ? ProcessState.Running : ProcessState.Stopped);
        }