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

◆ LoadIntoBufferAsyncCore()

async Task System.Net.Http.HttpContent.LoadIntoBufferAsyncCore ( Task serializeToStreamTask,
MemoryStream tempBuffer )
inlineprivateinherited

Definition at line 592 of file HttpContent.cs.

593 {
594 try
595 {
596 await serializeToStreamTask.ConfigureAwait(continueOnCapturedContext: false);
597 }
598 catch (Exception ex)
599 {
600 tempBuffer.Dispose();
601 Exception streamCopyException = GetStreamCopyException(ex);
602 if (streamCopyException != ex)
603 {
604 throw streamCopyException;
605 }
606 throw;
607 }
608 try
609 {
610 tempBuffer.Seek(0L, SeekOrigin.Begin);
611 _bufferedContent = tempBuffer;
612 }
613 catch (Exception message)
614 {
615 if (System.Net.NetEventSource.Log.IsEnabled())
616 {
617 System.Net.NetEventSource.Error(this, message, "LoadIntoBufferAsyncCore");
618 }
619 throw;
620 }
621 }
override long Seek(long offset, SeekOrigin loc)
override void Dispose(bool disposing)
static Exception GetStreamCopyException(Exception originalException)
static readonly System.Net.NetEventSource Log
static void Error(object thisOrContextObject, FormattableString formattableString, [CallerMemberName] string memberName=null)
new ConfiguredTaskAwaitable< TResult > ConfigureAwait(bool continueOnCapturedContext)
Definition Task.cs:226

References System.Net.Http.HttpContent._bufferedContent, System.Threading.Tasks.Task< TResult >.ConfigureAwait(), System.IO.MemoryStream.Dispose(), System.Net.NetEventSource.Error(), System.Net.Http.HttpContent.GetStreamCopyException(), System.L, System.Net.NetEventSource.Log, and System.IO.MemoryStream.Seek().

Referenced by System.Net.Http.HttpContent.LoadIntoBufferAsync().