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

◆ SerializeToStream()

override void System.Net.Http.MultipartContent.SerializeToStream ( Stream stream,
TransportContext? context,
CancellationToken cancellationToken )
inlineprotectedvirtualinherited

Reimplemented from System.Net.Http.HttpContent.

Definition at line 356 of file MultipartContent.cs.

357 {
358 try
359 {
360 WriteToStream(stream, "--" + _boundary + "\r\n");
361 for (int i = 0; i < _nestedContent.Count; i++)
362 {
366 }
367 WriteToStream(stream, "\r\n--" + _boundary + "--\r\n");
368 }
369 catch (Exception message)
370 {
371 if (System.Net.NetEventSource.Log.IsEnabled())
372 {
373 System.Net.NetEventSource.Error(this, message, "SerializeToStream");
374 }
375 throw;
376 }
377 }
void CopyTo(KeyValuePair< TKey, TValue >[] array, int index)
readonly List< HttpContent > _nestedContent
static void WriteToStream(Stream stream, string content)
void SerializeHeadersToStream(Stream stream, HttpContent content, bool writeDivider)
static readonly System.Net.NetEventSource Log
static void Error(object thisOrContextObject, FormattableString formattableString, [CallerMemberName] string memberName=null)

References System.Net.Http.MultipartContent._boundary, System.Net.Http.MultipartContent._nestedContent, System.cancellationToken, System.Collections.Generic.Dictionary< TKey, TValue >.CopyTo(), System.Collections.Generic.Dictionary< TKey, TValue >.Count, System.Net.NetEventSource.Error(), System.Net.NetEventSource.Log, System.Net.Http.MultipartContent.SerializeHeadersToStream(), System.stream, and System.Net.Http.MultipartContent.WriteToStream().