protected override void OnStop()
        {
            string systemProcess = string.Empty;

            if (ConfigurationManager.AppSettings["SystemProcess"] != null)
            {
                systemProcess = ConfigurationManager.AppSettings["SystemProcess"].ToString();
            }

            List <SystemProcessThread> processThreads = webClient.GetSystemProcessThreadsByProcessName(systemProcess);

            foreach (SystemProcessThread systemProcessThread in processThreads)
            {
                systemProcessThread.Status         = GenericServiceThread.EngineStatusList.Stopped.ToString();
                systemProcessThread.Enabled        = false;
                systemProcessThread.LastUpdateDate = DateTime.UtcNow;
                webClient.UpdateSystemProcessThread(systemProcessThread);
            }
            //    ServiceLogManager.GetLogger(this.GetType().Name).Info(string.Format("Stopped {0} Background Service", systemProcess));

            processor.StopEngines();
        }
 public TaskProcessorCore(SystemProcess systemProcess)
 {
     _systemProcess = systemProcess;
     processThreads = webClient.GetSystemProcessThreadsByProcessName(_systemProcess.Name);
 }