private List <QueueDescription> GetMonitorProcessingQueues(AzureServiceBusWatcherConfiguration.ProcessingConfiguration processingConfiguration, List <QueueDescription> queues)
 {
     if (processingConfiguration.MonitorAllItems)
     {
         return(queues);
     }
     else if (processingConfiguration.ExcemptItems.Any())
     {
         return
             (queues.Where(
                  queue => processingConfiguration.ExcemptItems.All(excemptQueue => excemptQueue != queue.Path))
              .ToList());
     }
     else if (processingConfiguration.SpecificItems.Any())
     {
         return(GetSpecificQueues(queues, _configuration.QueueProcessingConfiguration.SpecificItems));
     }
     throw new ArgumentException("Configuration for queue processing has been setup incorrectly.");
 }
 private List <TopicDescription> GetMonitorProcessingTopics(AzureServiceBusWatcherConfiguration.ProcessingConfiguration processingConfiguration, List <TopicDescription> topics)
 {
     if (processingConfiguration.MonitorAllItems)
     {
         return(topics);
     }
     else if (processingConfiguration.ExcemptItems.Any())
     {
         return
             (topics.Where(
                  topic => processingConfiguration.ExcemptItems.All(excemptTopic => excemptTopic != topic.Path))
              .ToList());
     }
     else if (processingConfiguration.SpecificItems.Any())
     {
         return(GetSpecificTopics(topics, _configuration.TopicProcessingConfiguration.SpecificItems));
     }
     throw new ArgumentException("Configuration for topic processing has been setup incorrectly.");
 }