Exemplo n.º 1
0
 private void PullFromRmq(object state)
 {
     if (pulling)
     {
         return;
     }
     try
     {
         pulling = true;
         var             service = UnityConfiguration.Instance.Reslove <IRmqSkypeService>();
         RmqSkypeMessage message = service.PullMessage();
         if (message != null)
         {
             OnSkypeMessageReceived(message.Conversation, new SkypeMessage {
                 Message = message.Message
             });
         }
     }
     catch (Exception ex)
     {
         ErrorLog.LogError("PullFromRmq error: {0}", ex.Message);
     }
     finally
     {
         pulling = false;
     }
 }
Exemplo n.º 2
0
        public IHttpActionResult SendMessagePost(RmqSkypeMessage jsonData)
        {
            var rmqService = new RmqSkypeService();

            rmqService.PushMessage(jsonData);
            return(Ok());
        }