/// <summary> /// Removes it from the server manager. /// </summary> /// <param name="identifier">The Server's unique identifier.</param> public static void RemoveServer(int identifier) { Server s = GetServer(identifier); // Check to see if any other servers are using this server's process. // If not, dispose of it. bool inUse = false; foreach (Server x in servers) { if (x.Process == s.Process) { inUse = true; } } if (!inUse) { ServerProcessManager.RemoveProcess(s.Process.Identifier); } servers.Remove(s); }