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

◆ CreateMemoryStream()

MemoryStream System.Net.Http.HttpContent.CreateMemoryStream ( long maxBufferSize,
out Exception error )
inlineprivateinherited

Definition at line 681 of file HttpContent.cs.

682 {
683 error = null;
684 long? contentLength = Headers.ContentLength;
685 if (contentLength.HasValue)
686 {
687 if (contentLength > maxBufferSize)
688 {
689 error = new HttpRequestException(System.SR.Format(CultureInfo.InvariantCulture, System.SR.net_http_content_buffersize_exceeded, maxBufferSize));
690 return null;
691 }
692 return new LimitMemoryStream((int)maxBufferSize, (int)contentLength.Value);
693 }
694 return new LimitMemoryStream((int)maxBufferSize, 0);
695 }
static CultureInfo InvariantCulture
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string net_http_content_buffersize_exceeded
Definition SR.cs:38
Definition SR.cs:7

References System.SR.Format(), System.Globalization.CultureInfo.InvariantCulture, and System.SR.net_http_content_buffersize_exceeded.

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