/// <summary> /// Intended for Testing Purposes /// </summary> /// <param name="options"></param> /// <param name="logger"></param> /// <param name="httpClient"></param> /// <param name="storageManager"></param> /// <param name="sender"></param> public AzureWebHookDequeueManager(IOptions <WebHooksAzureDequeueManagerOptions> options, ILogger <AzureWebHookDequeueManager> logger, HttpClient httpClient, IStorageManager storageManager, WebHookSender webHookSender) { if (options == null) { throw new ArgumentNullException("options"); } if (logger == null) { throw new ArgumentNullException("logger"); } _options = options.Value; _logger = logger; _httpClient = httpClient; _storageManager = storageManager; _sender = webHookSender; }
/// <summary> /// Initializes a new instance of the <see cref="AzureWebHookDequeueManager"/> using the given <paramref name="connectionString"/> /// to identify the Microsoft Azure Storage Queue. /// </summary> /// <param name="connectionString">The Microsoft Azure Storage Queue connection string.</param> /// <param name="logger">The <see cref="ILogger"/> instance to use for logging errors and warnings.</param> public AzureWebHookDequeueManager(IOptions <WebHooksAzureDequeueManagerOptions> options, ILogger <AzureWebHookDequeueManager> logger) { if (options == null) { throw new ArgumentNullException("options"); } if (logger == null) { throw new ArgumentNullException("logger"); } _options = options.Value; _logger = logger; _httpClient = new HttpClient(); _storageManager = new StorageManager(logger); _sender = new QueuedSender(this, logger); }