/// <summary>
        /// Creates a new AzureTableInstanceStore using the supplied hub name and table connection string
        /// </summary>
        /// <param name="hubName">The hubname for this instance store</param>
        /// <param name="tableConnectionString">Azure table connection string</param>
        public AzureTableInstanceStore(string hubName, string tableConnectionString)
        {
            this.tableClient = new AzureTableClient(hubName, tableConnectionString);

            // Workaround an issue with Storage that throws exceptions for any date < 1600 so DateTime.Min cannot be used
            DateTimeUtils.SetMinDateTimeForStorageEmulator();
        }
Beispiel #2
0
        /// <summary>
        /// Creates a new AzureTableInstanceStore using the supplied hub name and cloud storage account
        /// </summary>
        /// <param name="hubName">The hub name for this instance store</param>
        /// <param name="cloudStorageAccount">Cloud Storage Account</param>
        public AzureTableInstanceStore(string hubName, CloudStorageAccount cloudStorageAccount)
        {
            if (cloudStorageAccount == null)
            {
                throw new ArgumentException("Invalid Cloud Storage Account", nameof(cloudStorageAccount));
            }

            if (string.IsNullOrWhiteSpace(hubName))
            {
                throw new ArgumentException("Invalid hub name", nameof(hubName));
            }

            this.tableClient = new AzureTableClient(hubName, cloudStorageAccount);

            // Workaround an issue with Storage that throws exceptions for any date < 1600 so DateTime.Min cannot be used
            DateTimeUtils.SetMinDateTimeForStorageEmulator();
        }