public ServiceBusClient(ServiceBusCfg cfg) { if (cfg is null) { throw new ArgumentNullException(nameof(cfg)); } cfg.Production .ToList() .ForEach(e => managers.Add(NamespaceManager.CreateFromConnectionString(e))); }
static void Main(string[] args) { ServiceBusCfg serviceBusCfg = ServiceBusCfg.Create(@"config/serviceBusConfig.json"); ServiceBusClient serviceBusClient = new ServiceBusClient(serviceBusCfg); try { var queues = serviceBusClient.GetQueueDescriptions(); queues.ForEach(q => Console.WriteLine(q.Path)); } catch (Exception e) { Console.WriteLine(e.Message); } Console.ReadLine(); }