Ejemplo n.º 1
0
        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;
            }
        }
Ejemplo n.º 2
0
        private async Task SendMessages()
        {
            SendReceive sr = new SendReceive
            {
                ServiceBusConnectionString = ServiceBusConnectionString,
                TopicName            = TopicName,
                Subscriptions        = Subscriptions,
                Store                = Store,
                NrOfMessagesPerStore = NrOfMessagesPerStore
            };

            await sr.SendMessages();

            await PresentMenu();
        }