RAWMessage ParseMessage(QueueChat chat) { return(new RAWMessage { ChannelId = chat.ChannelId, ConversationId = chat.ConversationId, DestinationLanguage = chat.DestinationLanguage, Error = chat.Error, FromId = chat.FromId, From = chat.From, IsRequestFromBot = chat.IsRequestFromBot, MessageType = chat.MessageType, Request = chat.Request, RequestAddress = chat.RequestAddress, RequestTime = chat.RequestTime, Response = chat.Response, ResponseTime = chat.ResponseTime, Sentiment = chat.Sentiment, SentimentResponse = chat.SentimentResponse, SourceLanguage = chat.SourceLanguage, To = chat.To, ToId = chat.ToId, TopicName = chat.TopicName }); }
public async Task QeueChatAsync(QueueChat chat) { var serializedMessage = JsonConvert.SerializeObject(chat); var message = new CloudQueueMessage(serializedMessage); var queue = GetQueue(); await queue.AddMessageAsync(message); }