コード例 #1
0
 public CoreDistributedCache(
     IDistributedCache cache, CacheConstraints constraints, string region, IDictionary <string, string> properties)
 {
     if (constraints?.MaxKeySize <= 0)
     {
         throw new ArgumentException($"{nameof(CacheConstraints.MaxKeySize)} must be null or superior to 1.",
                                     nameof(constraints));
     }
     _cache        = cache;
     _maxKeySize   = constraints?.MaxKeySize;
     _keySanitizer = constraints?.KeySanitizer;
     RegionName    = region;
     Configure(properties);
 }
コード例 #2
0
 public CoreDistributedCache(
     IDistributedCache cache, CacheConstraints constraints, string region,
     IDictionary <string, string> properties)
     : base(cache, constraints, region, properties)
 {
 }