Beispiel #1
0
 public DifiMessage AddLatestStatusOnSingle(DifiMessage message)
 {
     message.latestMessageStatus = message.messageStatuses.Last().status.ToString();
     message.created             = message.messageStatuses.First().lastUpdate;
     message.messageStatuses.ToList().Reverse();
     return(message);
 }
Beispiel #2
0
 ////////////////////////
 ///    CONSTRUCTOR   ///
 ////////////////////////
 public MessageMergeServiceTest()
 {
     _difiMessage1 = new DifiMessage
     {
         messageId        = "test1",
         conversationId   = "test1",
         senderIdentifier = "sender1"
     };
     _difiMessage2 = new DifiMessage
     {
         messageId        = "test2",
         conversationId   = "test2",
         senderIdentifier = "sender2"
     };
     _difiMessage3 = new DifiMessage
     {
         messageId        = "differentMessageId",
         conversationId   = "differentConversationId",
         senderIdentifier = "something"
     };
     _eleMessage1 = new ElementsMessage
     {
         ConversationId = "test1",
         IsRead         = "true"
     };
     _eleMessage2 = new ElementsMessage
     {
         ConversationId = "test2",
         IsRead         = "false"
     };
 }
 //Takes a single difi and elements message object and returns them in a single message object
 public Message MergeMessages(DifiMessage difiMessages, ElementsMessage elementsMessages)
 {
     return(new Message
     {
         DifiMessage = difiMessages,
         ElementsMessage = elementsMessages
     });
 }