예제 #1
0
        private async void btnConfirm_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                await hc.DeleteMessage("https://[servicebusname].servicebus.windows.net/open/subscriptions/all", m_msg.brokerProperties.MessageId, m_msg.brokerProperties.LockToken.Value);

                txtInfo.Text = "";
            }
            catch (Exception ex)
            {
                //Too slow,lock timeout, message was processed on another station
            }
            btnConfirm.IsEnabled = false;
            await Task.Factory.StartNew(waitForMessage);
        }