static void ProcessMessages(ServiceBusConfig serviceBusConfig) { QueueClient queueClient = new QueueClient(serviceBusConfig.ConnectionString, serviceBusConfig.QueueName); queueClient.RegisterMessageHandler(MessageHandlerAsync, ExceptionHandlerAsync); Console.ReadLine(); queueClient.CloseAsync().Wait(); Console.WriteLine("Messages are Processed"); }
static RfidDupMsgReceiver() { ServiceBusConfig serviceBusConfig = Program.InitServiceBusConfig(); _queueClient = new QueueClient(serviceBusConfig.ConnectionString, _QueueName); }
static Program() { ServiceBusConfig serviceBusConfig = InitServiceBusConfig(); _queueClient = new QueueClient(serviceBusConfig.ConnectionString, serviceBusConfig.QueueName); }