private async Task Receive() { SendReceive sr = new SendReceive { ServiceBusConnectionString = ServiceBusConnectionString, TopicName = TopicName, Subscriptions = Subscriptions, Store = Store, NrOfMessagesPerStore = NrOfMessagesPerStore }; Console.WriteLine("\nReceiveing messages. Press any key to exit once all messages have been received. Alternatively press \"M\" to get to the menu\n"); await sr.Receive(); char key = Console.ReadKey(true).KeyChar; string keyPressed = key.ToString().ToUpper(); switch (keyPressed) { case "M": await PresentMenu(); break; } }
private async Task SendMessages() { SendReceive sr = new SendReceive { ServiceBusConnectionString = ServiceBusConnectionString, TopicName = TopicName, Subscriptions = Subscriptions, Store = Store, NrOfMessagesPerStore = NrOfMessagesPerStore }; await sr.SendMessages(); await PresentMenu(); }