Exemple #1
0
 private void Worker(MessageEntry msg)
 {
     Trace.TraceInformation($"Received query. Data: {msg.ReceivedMessage.GetMessageContentString()}");
     // throw new Exception("test exception");
     msg.ResponseOk("MyQueryHanlder - ok!");
     if (!string.IsNullOrEmpty(msg.ReceivedMessage.GetVia().GetLast().responseHandlerName))
     {
         if (!querySet1.Task.IsCompleted)
         {
             querySet1.SetResult(true); //by handler
         }
     }
     else
     {
         if (!querySet2.Task.IsCompleted)
         {
             querySet2.SetResult(true); //by callback
         }
     }
 }
Exemple #2
0
 private void Worker(MessageEntry msg)
 {
     Trace.TraceInformation($"Received query. Data: {msg.ReceivedMessage.GetMessageContentString()}");
     // throw new Exception("test exception");
     msg.ResponseOk("MyQueryHanlder - ok!");
 }