예제 #1
0
        /// <summary>
        /// Deletes the queue.
        /// </summary>
        /// <param name="queueName">Name of the queue.</param>
        /// <param name="configAction">The configuration action.</param>
        /// <returns></returns>
        public virtual IFluentRabbit DeleteQueue(string queueName, Action <DeleteQueueConfig> configAction = null)
        {
            return(TryCatch_Trace(MethodBase.GetCurrentMethod(),
                                  () =>
            {
                var config = new DeleteQueueConfig();
                configAction?.Invoke(config);

                DeleteQueue(queueName, config);
            }));
        }
예제 #2
0
        /// <summary>
        /// Deletes the queue.
        /// </summary>
        /// <param name="queueName">Name of the queue.</param>
        /// <param name="config">The configuration.</param>
        /// <returns></returns>
        public virtual IFluentRabbit DeleteQueue(string queueName, DeleteQueueConfig config)
        {
            return(TryCatch_Trace(MethodBase.GetCurrentMethod(),
                                  () =>
            {
                //validation
                config.ThrowExceptionIfNull <ArgumentNullException>(nameof(config));
                RabbitMqClient.Model.ThrowExceptionIfNull <ModelIsNullException>();

                //execution
                RabbitMqClient.Model.QueueDelete(queueName, config.IfUnused, config.IfEmpty);
            }));
        }