/// <summary> /// Initializes a new instance of the <see cref="JobAlertIdEncoder"/> class. /// </summary> /// <param name="queryConverter">The query converter.</param> /// <exception cref="ArgumentNullException">queryConverter</exception> public JobAlertIdEncoder(IJobSearchQueryConverter queryConverter) { if (queryConverter == null) { throw new ArgumentNullException(nameof(queryConverter)); } _queryConverter = queryConverter; }
/// <summary> /// Initializes a new instance of the <see cref="AzureTableStorageAlertsRepository"/> class. /// </summary> /// <param name="queryConverter">The query converter.</param> /// <exception cref="ArgumentNullException">queryConverter</exception> public AzureTableStorageAlertsRepository(IJobSearchQueryConverter queryConverter, string azureStorageConnectionString) { if (queryConverter == null) { throw new ArgumentNullException(nameof(queryConverter)); } if (string.IsNullOrEmpty(azureStorageConnectionString)) { throw new ArgumentException("azureStorageConnectionString was not specified", nameof(azureStorageConnectionString)); } _queryConverter = queryConverter; var storageAccount = CloudStorageAccount.Parse(azureStorageConnectionString); _tableClient = storageAccount.CreateCloudTableClient(); }