Ejemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="BlobContentHashListWithCacheMetadata"/> class.
        /// </summary>
        public BlobContentHashListWithCacheMetadata(
            BlobContentHashListWithDeterminism contentHashListWithDeterminism,
            DateTime?contentHashListExpirationUtc,
            ContentAvailabilityGuarantee contentGuarantee,
            byte[] hashOfExistingContentHashList = null)
        {
            if (contentHashListExpirationUtc != null && contentHashListExpirationUtc.Value.Kind != DateTimeKind.Utc)
            {
                throw new ArgumentException("Time to live must be an absolute UTC date time.");
            }

            ContentHashListWithDeterminism = contentHashListWithDeterminism;
            ContentHashListExpirationUtc   = contentHashListExpirationUtc;
            ContentGuarantee = contentGuarantee;
            HashOfExistingContentHashList = hashOfExistingContentHashList;
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BlobContentHashListWithCacheMetadata"/> class.
 /// </summary>
 public BlobContentHashListWithCacheMetadata(BlobContentHashListWithDeterminism contentHashListWithDeterminism, DateTime contentHashListExpirationUtc)
     : this(contentHashListWithDeterminism, contentHashListExpirationUtc, ContentAvailabilityGuarantee.NoContentBackedByCache)
 {
 }