Пример #1
0
 public QueueListener(ServiceBusSetting serviceBusSetting, string queueName)
 {
     if (serviceBusSetting == null)
     {
         throw new ArgumentNullException(nameof(serviceBusSetting));
     }
     if (string.IsNullOrWhiteSpace(queueName))
     {
         throw new ArgumentNullException(nameof(queueName));
     }
     _isStarted   = false;
     _processors  = new List <IProcessor <T> >();
     _queueClient = new QueueClient(serviceBusSetting.ConnectionString, queueName, ReceiveMode.PeekLock, RetryPolicy.Default);
 }
Пример #2
0
 public MessageBusClient(ServiceBusSetting serviceBusSetting)
 {
     _serviceBusSetting = serviceBusSetting ?? throw new ArgumentNullException(nameof(serviceBusSetting));
 }