@@ -1007,7 +1007,6 @@ private async Task<Response<BlobDownloadInfo>> DownloadInternal(
10071007 {
10081008 Response < BlobDownloadStreamingResult > response = await DownloadStreamingDirect (
10091009 range ,
1010- range != default ,
10111010 conditions ,
10121011 rangeGetContentHash . ToValidationOptions ( ) ,
10131012 progressHandler : default ,
@@ -1241,7 +1240,6 @@ public virtual Response<BlobDownloadStreamingResult> DownloadStreaming(
12411240 {
12421241 return DownloadStreamingDirect (
12431242 range ,
1244- true ,
12451243 conditions ,
12461244 rangeGetContentHash . ToValidationOptions ( ) ,
12471245 progressHandler ,
@@ -1318,7 +1316,6 @@ public virtual async Task<Response<BlobDownloadStreamingResult>> DownloadStreami
13181316 {
13191317 return await DownloadStreamingDirect (
13201318 range ,
1321- true ,
13221319 conditions ,
13231320 rangeGetContentHash . ToValidationOptions ( ) ,
13241321 progressHandler ,
@@ -1372,7 +1369,6 @@ public virtual Response<BlobDownloadStreamingResult> DownloadStreaming(
13721369 {
13731370 return DownloadStreamingDirect (
13741371 options ? . Range ?? default ,
1375- options ? . _isRangeSet ?? false ,
13761372 options ? . Conditions ,
13771373 options ? . TransferValidation ,
13781374 options ? . ProgressHandler ,
@@ -1420,7 +1416,6 @@ public virtual async Task<Response<BlobDownloadStreamingResult>> DownloadStreami
14201416 {
14211417 return await DownloadStreamingDirect (
14221418 options ? . Range ?? default ,
1423- options ? . _isRangeSet ?? false ,
14241419 options ? . Conditions ,
14251420 options ? . TransferValidation ,
14261421 options ? . ProgressHandler ,
@@ -1435,7 +1430,6 @@ public virtual async Task<Response<BlobDownloadStreamingResult>> DownloadStreami
14351430 /// Implementation for public DownloadStreaming/DownloadContent methods to call into.
14361431 /// </summary>
14371432 /// <param name="range"></param>
1438- /// <param name="isRangeSet"></param>
14391433 /// <param name="conditions"></param>
14401434 /// <param name="transferValidationOverride"></param>
14411435 /// <param name="progressHandler"></param>
@@ -1445,7 +1439,6 @@ public virtual async Task<Response<BlobDownloadStreamingResult>> DownloadStreami
14451439 /// <returns></returns>
14461440 private async ValueTask < Response < BlobDownloadStreamingResult > > DownloadStreamingDirect (
14471441 HttpRange range ,
1448- bool isRangeSet ,
14491442 BlobRequestConditions conditions ,
14501443 DownloadTransferValidationOptions transferValidationOverride ,
14511444 IProgress < long > progressHandler ,
@@ -1462,7 +1455,7 @@ private async ValueTask<Response<BlobDownloadStreamingResult>> DownloadStreaming
14621455 }
14631456 }
14641457
1465- var response = await DownloadStreamingInternal ( range , isRangeSet , conditions , transferValidationOverride , progressHandler , operationName , async , cancellationToken ) . ConfigureAwait( false) ;
1458+ var response = await DownloadStreamingInternal ( range , conditions , transferValidationOverride , progressHandler , operationName , async , cancellationToken ) . ConfigureAwait( false) ;
14661459
14671460 // if using clientside encryption, wrap the auto-retry stream in a decryptor
14681461 // we already return a nonseekable stream; returning a crypto stream is fine
@@ -1488,9 +1481,6 @@ private async ValueTask<Response<BlobDownloadStreamingResult>> DownloadStreaming
14881481 /// <param name="range">
14891482 /// Optionally specified range.
14901483 /// </param>
1491- /// <param name="isRangeSet">
1492- /// If range has been set
1493- /// </param>
14941484 /// <param name="conditions">
14951485 /// Access conditions.
14961486 /// </param>
@@ -1512,7 +1502,6 @@ private async ValueTask<Response<BlobDownloadStreamingResult>> DownloadStreaming
15121502 /// <returns></returns>
15131503 internal virtual async ValueTask < Response < BlobDownloadStreamingResult > > DownloadStreamingInternal (
15141504 HttpRange range ,
1515- bool isRangeSet ,
15161505 BlobRequestConditions conditions ,
15171506 DownloadTransferValidationOptions transferValidationOverride ,
15181507 IProgress < long > progressHandler ,
@@ -1540,7 +1529,6 @@ internal virtual async ValueTask<Response<BlobDownloadStreamingResult>> Download
15401529 // Start downloading the blob
15411530 Response < BlobDownloadStreamingResult > response = await StartDownloadAsync (
15421531 range ,
1543- isRangeSet ,
15441532 conditions ,
15451533 validationOptions ,
15461534 async : async ,
@@ -1564,7 +1552,6 @@ internal virtual async ValueTask<Response<BlobDownloadStreamingResult>> Download
15641552 startOffset =>
15651553 StartDownloadAsync (
15661554 range ,
1567- isRangeSet ,
15681555 conditionsWithEtag ,
15691556 validationOptions ,
15701557 startOffset ,
@@ -1575,7 +1562,6 @@ internal virtual async ValueTask<Response<BlobDownloadStreamingResult>> Download
15751562 async startOffset =>
15761563 ( await StartDownloadAsync (
15771564 range ,
1578- isRangeSet ,
15791565 conditionsWithEtag ,
15801566 validationOptions ,
15811567 startOffset ,
@@ -1643,9 +1629,6 @@ await ContentHasher.AssertResponseHashMatchInternal(
16431629 /// If provided, only download the bytes of the blob in the specified
16441630 /// range. If not provided, download the entire blob.
16451631 /// </param>
1646- /// <param name="isRangeSet">
1647- /// Whether range has been set.
1648- /// </param>
16491632 /// <param name="conditions">
16501633 /// Optional <see cref="BlobRequestConditions"/> to add conditions on
16511634 /// downloading this blob.
@@ -1676,15 +1659,14 @@ await ContentHasher.AssertResponseHashMatchInternal(
16761659 /// </remarks>
16771660 private async ValueTask< Response< BlobDownloadStreamingResult>> StartDownloadAsync(
16781661 HttpRange range ,
1679- bool isRangeSet ,
16801662 BlobRequestConditions conditions ,
16811663 DownloadTransferValidationOptions validationOptions ,
16821664 long startOffset = 0 ,
16831665 bool async = true,
16841666 CancellationToken cancellationToken = default )
16851667 {
16861668 HttpRange ? pageRange = null ;
1687- if ( isRangeSet ) // we want to check if the range has been manually set
1669+ if ( range != default ( HttpRange ) ) // we want to check between non-nullable ranges
16881670 {
16891671 pageRange = new HttpRange (
16901672 range . Offset + startOffset ,
@@ -1961,7 +1943,6 @@ public virtual Response<BlobDownloadResult> DownloadContent(
19611943 conditions ,
19621944 progressHandler : default ,
19631945 range : default ,
1964- isRangeSet : false ,
19651946 transferValidationOverride : default ,
19661947 false , // async
19671948 cancellationToken )
@@ -2018,7 +1999,6 @@ await DownloadContentInternal(
20181999 conditions ,
20192000 progressHandler : default ,
20202001 range : default ,
2021- isRangeSet : false ,
20222002 transferValidationOverride : default ,
20232003 true , // async
20242004 cancellationToken )
@@ -2084,7 +2064,6 @@ public virtual Response<BlobDownloadResult> DownloadContent(
20842064 conditions ,
20852065 progressHandler ,
20862066 range ,
2087- true ,
20882067 transferValidationOverride : default ,
20892068 false , // async
20902069 cancellationToken )
@@ -2150,7 +2129,6 @@ await DownloadContentInternal(
21502129 conditions ,
21512130 progressHandler ,
21522131 range ,
2153- true ,
21542132 transferValidationOverride : default ,
21552133 true , // async
21562134 cancellationToken )
@@ -2203,7 +2181,6 @@ public virtual Response<BlobDownloadResult> DownloadContent(
22032181 options ? . Conditions ,
22042182 options ? . ProgressHandler ,
22052183 options ? . Range ?? default ,
2206- options ? . _isRangeSet ?? false ,
22072184 options ? . TransferValidation ,
22082185 async: false ,
22092186 cancellationToken ) . EnsureCompleted ( ) ;
@@ -2255,7 +2232,6 @@ await DownloadContentInternal(
22552232 options ? . Conditions ,
22562233 options ? . ProgressHandler ,
22572234 options ? . Range ?? default ,
2258- options ? . _isRangeSet ?? false ,
22592235 options ? . TransferValidation ,
22602236 async: true ,
22612237 cancellationToken ) . ConfigureAwait ( false ) ;
@@ -2264,14 +2240,12 @@ private async Task<Response<BlobDownloadResult>> DownloadContentInternal(
22642240 BlobRequestConditions conditions ,
22652241 IProgress < long > progressHandler ,
22662242 HttpRange range ,
2267- bool isRangeSet ,
22682243 DownloadTransferValidationOptions transferValidationOverride ,
22692244 bool async ,
22702245 CancellationToken cancellationToken )
22712246 {
22722247 Response< BlobDownloadStreamingResult > response = await DownloadStreamingDirect (
22732248 range ,
2274- isRangeSet ,
22752249 conditions ,
22762250 transferValidationOverride : transferValidationOverride ,
22772251 progressHandler ,
@@ -3212,7 +3186,6 @@ internal async Task<Stream> OpenReadInternal(
32123186 }
32133187 Response < BlobDownloadStreamingResult > response = await DownloadStreamingInternal (
32143188 range ,
3215- true ,
32163189 readConditions ,
32173190 transferValidationOverride : downloadValidationOptions ,
32183191 progressHandler : default ,
0 commit comments