/// <summary>
        /// Deep copy constructor.
        /// </summary>
        /// <param name="deepCopySource"></param>
        private BlobDownloadOptions(BlobDownloadOptions deepCopySource)
        {
            Argument.AssertNotNull(deepCopySource, nameof(deepCopySource));

            Range      = new HttpRange(offset: deepCopySource.Range.Offset, length: deepCopySource.Range.Length);
            Conditions = BlobRequestConditions.CloneOrDefault(deepCopySource.Conditions);
            // can't access an internal deep copy in Storage.Common
            TransactionalHashingOptions = deepCopySource.TransactionalHashingOptions == default
                ? default
                : new DownloadTransactionalHashingOptions()
            {
                Algorithm = deepCopySource.TransactionalHashingOptions.Algorithm,
                Validate  = deepCopySource.TransactionalHashingOptions.Validate
            };
        }
Exemplo n.º 2
0
        /// <summary>
        /// Deep copy constructor.
        /// </summary>
        /// <param name="deepCopySource"></param>
        private BlobDownloadOptions(BlobDownloadOptions deepCopySource)
        {
            Argument.AssertNotNull(deepCopySource, nameof(deepCopySource));

            Range           = new HttpRange(offset: deepCopySource.Range.Offset, length: deepCopySource.Range.Length);
            Conditions      = BlobRequestConditions.CloneOrDefault(deepCopySource.Conditions);
            ProgressHandler = deepCopySource.ProgressHandler;
            // can't access an internal deep copy in Storage.Common
            // TODO #27253
            //TransactionalHashingOptions = deepCopySource.TransactionalHashingOptions == default
            //    ? default
            //    : new DownloadTransactionalHashingOptions()
            //    {
            //        Algorithm = deepCopySource.TransactionalHashingOptions.Algorithm,
            //        Validate = deepCopySource.TransactionalHashingOptions.Validate
            //    };
        }
 /// <summary>
 /// Creates a deep copy of the given instance, if any.
 /// </summary>
 /// <param name="deepCopySource">Instance to deep copy.</param>
 /// <returns>The deep copy, or null.</returns>
 internal static BlobDownloadOptions CloneOrDefault(BlobDownloadOptions deepCopySource)
 {
     if (deepCopySource == default)
     {
         return(default);