public ActionResult Receive() { ServiceBusMessageData messageInfo = new ServiceBusMessageData(); List <string> receivedMessages = ReceivedMessageStore.GetReceivedMessages(); if (receivedMessages.Count > 0) { messageInfo.MessagesReceived = string.Join(Environment.NewLine, receivedMessages); } else { messageInfo.MessagesReceived = "No messages from queue received yet!"; } return(View("Index", messageInfo)); }
public async Task <ActionResult> Receive() { await _startProcessingTask.ConfigureAwait(false); ServiceBusMessageData messageInfo = new ServiceBusMessageData(); List <string> receivedMessages = ReceivedMessageStore.GetReceivedMessages(); if (receivedMessages.Count > 0) { messageInfo.MessagesReceived = string.Join(Environment.NewLine, receivedMessages); } else { messageInfo.MessagesReceived = "No messages from queue received yet!"; } return(View("Index", messageInfo)); }