@@ -158,7 +158,7 @@ public override async Task WriteAsync(byte[] buffer, int offset, int count, Canc
158
158
159
159
if ( bytesToWrite == maxBytesToWrite )
160
160
{
161
- await this . DispatchWriteAsync ( ) ;
161
+ await this . DispatchWriteAsync ( ) . ConfigureAwait ( false ) ;
162
162
}
163
163
}
164
164
}
@@ -188,7 +188,7 @@ public override async Task FlushAsync(CancellationToken cancellationToken)
188
188
throw new InvalidOperationException ( SR . BlobStreamAlreadyCommitted ) ;
189
189
}
190
190
191
- await this . DispatchWriteAsync ( ) ;
191
+ await this . DispatchWriteAsync ( ) . ConfigureAwait ( false ) ;
192
192
await Task . Run ( ( ) => this . noPendingWritesEvent . Wait ( ) , cancellationToken ) ;
193
193
194
194
if ( this . lastException != null )
@@ -225,7 +225,7 @@ protected override void Dispose(bool disposing)
225
225
/// <returns>A task that represents the asynchronous commit operation.</returns>
226
226
public override async Task CommitAsync ( )
227
227
{
228
- await this . FlushAsync ( ) ;
228
+ await this . FlushAsync ( ) . ConfigureAwait ( false ) ;
229
229
this . committed = true ;
230
230
231
231
try
@@ -237,14 +237,14 @@ public override async Task CommitAsync()
237
237
this . blockBlob . Properties . ContentMD5 = this . blobMD5 . ComputeHash ( ) ;
238
238
}
239
239
240
- await this . blockBlob . PutBlockListAsync ( this . blockList , this . accessCondition , this . options , this . operationContext ) ;
240
+ await this . blockBlob . PutBlockListAsync ( this . blockList , this . accessCondition , this . options , this . operationContext ) . ConfigureAwait ( false ) ;
241
241
}
242
242
else
243
243
{
244
244
if ( this . blobMD5 != null )
245
245
{
246
246
this . Blob . Properties . ContentMD5 = this . blobMD5 . ComputeHash ( ) ;
247
- await this . Blob . SetPropertiesAsync ( this . accessCondition , this . options , this . operationContext ) ;
247
+ await this . Blob . SetPropertiesAsync ( this . accessCondition , this . options , this . operationContext ) . ConfigureAwait ( false ) ;
248
248
}
249
249
}
250
250
}
@@ -282,7 +282,7 @@ private async Task DispatchWriteAsync()
282
282
{
283
283
string blockId = this . GetCurrentBlockId ( ) ;
284
284
this . blockList . Add ( blockId ) ;
285
- await this . WriteBlockAsync ( bufferToUpload , blockId , bufferMD5 ) ;
285
+ await this . WriteBlockAsync ( bufferToUpload , blockId , bufferMD5 ) . ConfigureAwait ( false ) ;
286
286
}
287
287
else if ( this . pageBlob != null )
288
288
{
@@ -294,7 +294,7 @@ private async Task DispatchWriteAsync()
294
294
295
295
long offset = this . currentBlobOffset ;
296
296
this . currentBlobOffset += bufferToUpload . Length ;
297
- await this . WritePagesAsync ( bufferToUpload , offset , bufferMD5 ) ;
297
+ await this . WritePagesAsync ( bufferToUpload , offset , bufferMD5 ) . ConfigureAwait ( false ) ;
298
298
}
299
299
else
300
300
{
@@ -310,7 +310,7 @@ private async Task DispatchWriteAsync()
310
310
throw this . lastException ;
311
311
}
312
312
313
- await this . WriteAppendBlockAsync ( bufferToUpload , offset , bufferMD5 ) ;
313
+ await this . WriteAppendBlockAsync ( bufferToUpload , offset , bufferMD5 ) . ConfigureAwait ( false ) ;
314
314
}
315
315
}
316
316
@@ -324,7 +324,7 @@ private async Task DispatchWriteAsync()
324
324
private async Task WriteBlockAsync ( Stream blockData , string blockId , string blockMD5 )
325
325
{
326
326
this . noPendingWritesEvent . Increment ( ) ;
327
- await this . parallelOperationSemaphore . WaitAsync ( ) ;
327
+ await this . parallelOperationSemaphore . WaitAsync ( ) . ConfigureAwait ( false ) ;
328
328
Task putBlockTask = this . blockBlob . PutBlockAsync ( blockId , blockData , blockMD5 , this . accessCondition , this . options , this . operationContext ) . ContinueWith ( task =>
329
329
{
330
330
if ( task . Exception != null )
@@ -347,7 +347,7 @@ private async Task WriteBlockAsync(Stream blockData, string blockId, string bloc
347
347
private async Task WritePagesAsync ( Stream pageData , long offset , string contentMD5 )
348
348
{
349
349
this . noPendingWritesEvent . Increment ( ) ;
350
- await this . parallelOperationSemaphore . WaitAsync ( ) ;
350
+ await this . parallelOperationSemaphore . WaitAsync ( ) . ConfigureAwait ( false ) ;
351
351
Task writePagesTask = this . pageBlob . WritePagesAsync ( pageData , offset , contentMD5 , this . accessCondition , this . options , this . operationContext ) . ContinueWith ( task =>
352
352
{
353
353
if ( task . Exception != null )
@@ -372,7 +372,7 @@ private async Task WritePagesAsync(Stream pageData, long offset, string contentM
372
372
private async Task WriteAppendBlockAsync ( Stream blockData , long offset , string blockMD5 )
373
373
{
374
374
this . noPendingWritesEvent . Increment ( ) ;
375
- await this . parallelOperationSemaphore . WaitAsync ( ) ;
375
+ await this . parallelOperationSemaphore . WaitAsync ( ) . ConfigureAwait ( false ) ;
376
376
377
377
this . accessCondition . IfAppendPositionEqual = offset ;
378
378
0 commit comments