Beispiel #1
0
 public void Send(IMessage message)
 {
     try
     {
         var messageBytes = MessageSerializer.EncodeMessage(message);
         lock (_client)
         {
             var sent = _client.Send(messageBytes, messageBytes.Length);
             _logger.LogSendMessage(message);
         }
     }
     catch (Exception e)
     {
         _logger.Log(e.ToString(), LogType.Error);
     }
 }
Beispiel #2
0
 public void Execute()
 {
     _logger.Log(_message, _type);
 }