コード例 #1
0
        static async Task Main(string[] args)
        {
            ServiceBusCredentials credentials = ServiceProviderBuilder.GetSettingValues();

            queueClient = new QueueClient(credentials.ConnectionString, credentials.QueueName);

            var messageHandlerOptions = new MessageHandlerOptions(ExceptionReceivedHandler)
            {
                MaxConcurrentCalls = 1,
                AutoComplete       = false
            };

            queueClient.RegisterMessageHandler(ProcessMessageAsync, messageHandlerOptions);

            Console.ReadLine();

            await queueClient.CloseAsync();
        }
コード例 #2
0
 public SettingValues(IOptions <ServiceBusCredentials> setting)
 {
     this.setting = setting.Value;
 }