public string Ping(string[] keys) { var now = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); try { var result = _proxy.Ping(keys); Console.ForegroundColor = ConsoleColor.DarkGray; Trace.Write(result); Console.ForegroundColor = ConsoleColor.Gray; return(result); } catch (CommunicationException ex) { Trace.WriteLine("Ping Communication Exception:" + ex.Message); TryReconnect(); } catch (Exception ex) { Trace.WriteLine("Ping Exception:" + ex.Message); TryReconnect(); } return(string.Empty); }