Esempio n. 1
0
 private void OnNext(ConversationDto message)
 {
     // Ignore invalid messages
     switch (message.MessageType) {
             case MessageTypes.Init:
             _suffix = message.Data;
             _conversation.Send(new ConversationDto { MessageType = MessageTypes.Ack });
             break;
         case MessageTypes.Request:
             _conversation.Send(new ConversationDto { MessageType = MessageTypes.Response, Data = message.Data + _suffix });
             break;
         case MessageTypes.End:
             _subscription.Dispose();
             _conversation.Dispose();
             break;
     }
 }
Esempio n. 2
0
 private void OnNext(ConversationDto message)
 {
     ResponseLbl.Text = string.Format("Last response: {0}, {1}", message.MessageType, message.Data);
 }