Ejemplo n.º 1
0
 /// <summary>
 /// Sets the cache-control header.
 /// </summary>
 /// <param name="bucketInfo">The bucket info dictionary.</param>
 /// <param name="value">The cache control values.</param>
 public static void SetCacheControl(this BucketInfo bucketInfo, CacheControlHeaderValue value)
 {
     if (value != null)
     {
         bucketInfo.Add("Cache-Control", value.ToString());
     }
 }
Ejemplo n.º 2
0
        public void MaximumItems()
        {
            Assert.Throws <InvalidOperationException>(() =>
            {
                var list = new BucketInfo();

                for (int i = 0; i < BucketInfo.MaximumBucketItemsAllowed + 1; i++)
                {
                    list.Add(Guid.NewGuid().ToString(), Guid.NewGuid().ToString());
                }
            });
        }