Пример #1
0
 public static void SendMessage <T>(T message)
 {
     try
     {
         _messages.Add(message);
         _messaging.Send(message);
     }
     catch (Exception e)
     {
         // THIS IS IMPORTANT, NO FAILURES CAN POSSIBLY GET OUT HERE
         Console.WriteLine(e);
     }
 }
Пример #2
0
 public static void SendMessage <T>(T message)
 {
     try
     {
         _messages.Add(message);
         _messaging.Send(message);
     }
     catch (Exception e)
     {
         // THIS IS IMPORTANT, NO FAILURES CAN POSSIBLY GET OUT HERE
         ConsoleWriter.Write(ConsoleColor.Yellow, e.ToString());
     }
 }
Пример #3
0
 public void SendMessage <T>(T message)
 {
     try
     {
         _messaging.Send(message);
     }
     catch (Exception e)
     {
         // THIS IS IMPORTANT, NO FAILURES CAN POSSIBLY GET OUT HERE
         var color = Console.ForegroundColor;
         Console.ForegroundColor = ConsoleColor.Yellow;
         Console.WriteLine(e.ToString());
         Console.ForegroundColor = color;
     }
 }