/// <summary> /// Creates a server process based on the supplied configuration data, and adds /// it to the Process Manager. /// </summary> /// <param name="processConfig">A valid ProcessConfigurationData object.</param> /// <returns>The process's unique identifier.</returns> public static int CreateProcess(ProcessConfigurationData processConfig) { ServerProcess proc = new ServerProcess(processConfig); proc.StartProcess(); processes.Add(proc); return(proc.Identifier); }
/// <summary> /// Stops the specified process, and removes it from the process manager. /// </summary> /// <param name="identifier">The process's unique identifier.</param> public static void RemoveProcess(int identifier) { ServerProcess proc = GetProcess(identifier); lock (proc) { if (proc.IsRunning) { proc.StopProcess(); } processes.Remove(proc); } }
public void Remove(ServerProcess process) { InnerList.Remove(process); }
public void Add(ServerProcess process) { InnerList.Add(process); }
/// <summary> /// Creates a new ServerProcessWatchdog object for the specified ServerProcess object. /// </summary> /// <param name="process">The ServerProcess object to be associated with this ServerProcessWatchdog object.</param> public ServerProcessWatchdog(ServerProcess process) { this.process = process; reports = new CrashReportCollection(10); process.ProcessCrash += new EventHandler(Process_ProcessCrash); }
public CrashReport(ServerProcess process) { crashTime = DateTime.Now; startTime = process.StartTime; }