File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed
sdk/storage/Azure.Storage.Common Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change 1313- Fixed bug where LazyLoadingReadOnlyStream overprovisions the default buffer memory for OpenRead
1414
1515### Other Changes
16+ - Implemented IAsyncDisposable in StorageWriteStream
1617
1718## 12.23.0-beta.1 (2025-02-11)
1819
Original file line number Diff line number Diff line change @@ -346,6 +346,30 @@ protected override void Dispose(bool disposing)
346346 base . Dispose ( disposing ) ;
347347 }
348348
349+ #if NETCOREAPP3_0_OR_GREATER || NETCORESTANDARD2_1_OR_GREATER
350+ public override async ValueTask DisposeAsync( )
351+ {
352+ if ( _disposed )
353+ {
354+ return ;
355+ }
356+
357+ try
358+ {
359+ await FlushAsync ( cancellationToken : default ) . ConfigureAwait ( false ) ;
360+ ValidateCallerCrcIfAny( ) ;
361+ }
362+ finally
363+ {
364+ _accumulatedDisposables . Dispose ( ) ;
365+ }
366+
367+ _disposed = true ;
368+
369+ await base . DisposeAsync ( ) . ConfigureAwait ( false ) ;
370+ }
371+ #endif
372+
349373 private void ValidateCallerCrcIfAny ( )
350374 {
351375 if ( UseMasterCrc && ! _userProvidedChecksum . IsEmpty )
You can’t perform that action at this time.
0 commit comments