public bool Ping(string host, int port) { var ping = new PingTest() { Address = $"{host}:{port}", Date = DateTime.Now, Success = TcpUtil.PingHost(host, port) }; if (!Pings.ContainsKey(ping.Date)) { Pings.Add(ping.Date, ping); } return(ping.Success); }