コード例 #1
0
        static async Task SendOrderMessages()
        {
            var orders = CreateTestOrders();
            var sender = new TopicSender(ServiceBusConnectionString, OrdersTopicPath);

            foreach (var order in orders)
            {
                await sender.SendOrderMessage(order);
            }

            // Always be a good Service Bus citizan...
            await sender.Close();
        }
コード例 #2
0
        static async Task SendOrderMessages()
        {
            var orders = CreateTestOrders();

            //use TopicClient(connectstring and name of topic)
            var sender = new TopicSender(ServiceBusConnectionString, OrdersTopicPath);

            foreach (var order in orders)
            {
                await sender.SendOrderMessage(order);
            }

            // Always Close...
            await sender.Close();
        }