/// <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;
 }
示例#2
0
        /// <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();
        }