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(); }
public SettingValues(IOptions <ServiceBusCredentials> setting) { this.setting = setting.Value; }