Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ DisposeAsync()

override async ValueTask System.IO.Strategies.Net5CompatFileStreamStrategy.DisposeAsync ( )
inlinevirtual

Reimplemented from System.IO.Stream.

Definition at line 655 of file Net5CompatFileStreamStrategy.cs.

656 {
657 try
658 {
659 if (_fileHandle != null && !_fileHandle.IsClosed && _writePos > 0)
660 {
661 await FlushAsync(default(CancellationToken)).ConfigureAwait(continueOnCapturedContext: false);
662 }
663 }
664 finally
665 {
666 if (_fileHandle != null && !_fileHandle.IsClosed)
667 {
670 }
672 GC.SuppressFinalize(this);
673 }
674 }
Task FlushAsync()
Definition Stream.cs:669
new ConfiguredTaskAwaitable< TResult > ConfigureAwait(bool continueOnCapturedContext)
Definition Task.cs:226

References System.IO.Strategies.Net5CompatFileStreamStrategy._fileHandle, System.IO.Strategies.Net5CompatFileStreamStrategy._preallocatedOverlapped, System.IO.Strategies.Net5CompatFileStreamStrategy._writePos, System.Threading.Tasks.Task< TResult >.ConfigureAwait(), System.Runtime.InteropServices.SafeHandle.Dispose(), System.Threading.PreAllocatedOverlapped.Dispose(), System.Threading.ThreadPoolBoundHandle.Dispose(), System.IO.Stream.FlushAsync(), System.Runtime.InteropServices.SafeHandle.IsClosed, System.GC.SuppressFinalize(), and Microsoft.Win32.SafeHandles.SafeFileHandle.ThreadPoolBinding.