PurgeQueueAsync() public méthode

Initiates the asynchronous execution of the PurgeQueue operation.
public PurgeQueueAsync ( PurgeQueueRequest request, System cancellationToken = default(CancellationToken) ) : Task
request Amazon.SQS.Model.PurgeQueueRequest Container for the necessary parameters to execute the PurgeQueue operation.
cancellationToken System /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. ///
Résultat Task
        /// <summary>
        /// Purges the specified queue name.
        /// </summary>
        public void Purge()
        {
            try
            {
                using (var client = new AmazonSQSClient(_credentials))
                {
                    _logger.Value.InfoFormat("SqsMessageConsumer: Purging the queue {0}", _queueUrl);

                    client.PurgeQueueAsync(_queueUrl).Wait();

                    _logger.Value.InfoFormat("SqsMessageConsumer: Purged the queue {0}", _queueUrl);
                }
            }
            catch (Exception exception)
            {
                _logger.Value.ErrorException("SqsMessageConsumer: Error purging queue {0}", exception, _queueUrl);
                throw;
            }
        }