Example #1
0
        private void btnDeleteQueue_Click(object sender, RoutedEventArgs e)
        {
            DeleteQueueRequest request = new DeleteQueueRequest();

            request.QueueUrl = (string.Format(CultureInfo.InvariantCulture, "{0}/{1}/{2}",
                                              QueueServiceURL, QueuePath, QueueName.Trim()));

            this.Dispatcher.BeginInvoke(() =>
            {
                this.MessageDeletedNotification = "Please wait...";
            });
            sqs.OnSQSResponse += GetDeleteQueueResponse;
            sqs.DeleteQueue(request);
        }
Example #2
0
        private void btnReceiveMessage_Click(object sender, RoutedEventArgs e)
        {
            ReceiveMessageRequest request = new ReceiveMessageRequest();

            request.QueueUrl = string.Format(CultureInfo.InvariantCulture, "{0}/{1}/{2}",
                                             QueueServiceURL, QueuePath, QueueName.Trim());

            this.Dispatcher.BeginInvoke(() =>
            {
                this.ReceivedMessage = "Please wait...";
            });
            sqs.OnSQSResponse += GetReceiveMessageResponse;
            sqs.ReceiveMessage(request);
        }
Example #3
0
        private void btnGetQueueAttribute_Click(object sender, RoutedEventArgs e)
        {
            GetQueueAttributesRequest request = new GetQueueAttributesRequest();

            request.AttributeName.Add("VisibilityTimeout");

            request.QueueUrl = string.Format(CultureInfo.InvariantCulture, "{0}/{1}/{2}",
                                             QueueServiceURL, QueuePath, QueueName.Trim());

            this.Dispatcher.BeginInvoke(() =>
            {
                this.AttributeValue = "Please wait...";
            });

            sqs.OnSQSResponse += GetQueueAttributeResponse;
            sqs.GetQueueAttributes(request);
        }