private static void WriteEvent(String label, ConnEventArgs e) { if (e == null) { Console.Out.WriteLine(label); } else if (e?.Error == null) { Console.Out.WriteLine(BeginFormatMessage(label, e.Conn, null, null).ToString()); } else { Console.Error.WriteLine(BeginFormatMessage(label, e.Conn, null, e.Error.Message).ToString()); } }
private void handleDisconnect(object sender, ConnEventArgs e) { hitDisconnect++; }