public void Stop() { if (Guard.DisableExecute()) { for (int i = 0; i < Servers.Length; i++) { Servers[i].Close(); } lock (Clients) { foreach (var kv in Clients) { kv.Value.Dispose(); } Clients.Clear(); } } else { throw new InvalidOperationException("Can only call Stop once."); } }