/// <summary>
        ///  Time range used as partition key value for all timeouts.
        /// </summary>
        /// <param name="partitionKeyScope">Partition key DateTime format string.</param>
        /// <param name="config"></param>
        /// <remarks>For optimal performance, this should be in line with the CatchUpInterval.</remarks>
        public static PersistenceExtentions <AzureStoragePersistence, StorageType.Timeouts> PartitionKeyScope(this PersistenceExtentions <AzureStoragePersistence, StorageType.Timeouts> config, string partitionKeyScope)
        {
            AzureTimeoutStorageGuard.CheckPartitionKeyScope(partitionKeyScope);

            config.GetSettings().Set("AzureTimeoutStorage.PartitionKeyScope", partitionKeyScope);
            return(config);
        }
Example #2
0
 public void Should_not_allow_invalid_partition_key_scope(string partitionKeyScope)
 {
     Assert.Throws <ArgumentException>(() => AzureTimeoutStorageGuard.CheckPartitionKeyScope(partitionKeyScope));
 }