54 stream.Position =
value - num;
274 if (
string.IsNullOrWhiteSpace(
subtype))
281 if (!
text.StartsWith(
'"'))
298 if (
string.IsNullOrWhiteSpace(
boundary))
312 if ((
'0' > c || c >
'9') && (
'a' > c || c >
'z') && (
'A' > c || c >
'Z') && !
"'()+_,-./:=? ".Contains(c))
405 output.Position = 0
L;
531 memoryStream.Position = 0
L;
537 long num = 2 + _boundary.Length + 2;
540 num += (_nestedContent.Count - 1) * (4 +
_boundary.Length + 2);
546 num += item2.Key.Length + 2;
551 num += encoding.GetByteCount(
item3);
556 num += (
num2 - 1) * 2;
568 num += 4 + _boundary.Length + 2 + 2;
void CopyTo(KeyValuePair< TKey, TValue >[] array, int index)
Enumerator GetEnumerator()
void Add(TKey key, TValue value)
static CultureInfo InvariantCulture
static void ValidateBufferArguments(byte[] buffer, int offset, int count)
int Read(byte[] buffer, int offset, int count)
Task< int > ReadAsync(byte[] buffer, int offset, int count)
Task CopyToAsync(Stream stream)
static Encoding DefaultHttpEncoding
override void Write(byte[] buffer, int offset, int count)
async ValueTask< int > ReadAsyncPrivate(Memory< byte > buffer, CancellationToken cancellationToken)
override Task< int > ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
override void Write(ReadOnlySpan< byte > buffer)
override IAsyncResult BeginRead(byte[] array, int offset, int count, AsyncCallback asyncCallback, object asyncState)
override void Dispose(bool disposing)
override long Seek(long offset, SeekOrigin origin)
override ValueTask WriteAsync(ReadOnlyMemory< byte > buffer, CancellationToken cancellationToken=default(CancellationToken))
override void SetLength(long value)
readonly Stream[] _streams
override ValueTask< int > ReadAsync(Memory< byte > buffer, CancellationToken cancellationToken=default(CancellationToken))
override int Read(Span< byte > buffer)
override Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
ContentReadStream(Stream[] streams)
override int Read(byte[] buffer, int offset, int count)
override int EndRead(IAsyncResult asyncResult)
override async ValueTask DisposeAsync()
async Task SerializeToStreamAsyncCore(Stream stream, TransportContext context, CancellationToken cancellationToken)
override void SerializeToStream(Stream stream, TransportContext? context, CancellationToken cancellationToken)
override bool TryComputeLength(out long length)
override Task SerializeToStreamAsync(Stream stream, TransportContext? context, CancellationToken cancellationToken)
Stream EncodeHeadersToNewStream(HttpContent content, bool writeDivider)
IEnumerator< HttpContent > GetEnumerator()
virtual void Add(HttpContent content)
static Stream EncodeStringToNewStream(string input)
static string GetDefaultBoundary()
override Task< Stream > CreateContentReadStreamAsync()
override Task SerializeToStreamAsync(Stream stream, TransportContext? context)
override Stream CreateContentReadStream(CancellationToken cancellationToken)
MultipartContent(string subtype)
async ValueTask< Stream > CreateContentReadStreamAsyncCore(bool async, CancellationToken cancellationToken)
MultipartContent(string subtype, string boundary)
override void Dispose(bool disposing)
readonly List< HttpContent > _nestedContent
HeaderEncodingSelector< HttpContent >? HeaderEncodingSelector
override bool AllowDuplex
override Task< Stream > CreateContentReadStreamAsync(CancellationToken cancellationToken)
static void WriteToStream(Stream stream, string content)
static void WriteToStream(Stream stream, string content, Encoding encoding)
static void ValidateBoundary(string boundary)
static ValueTask EncodeStringToStreamAsync(Stream stream, string input, CancellationToken cancellationToken)
readonly string _boundary
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)
static string Format(string resourceFormat, object p1)
static string net_http_headers_invalid_value
static string net_http_argument_empty_string
static string net_http_content_field_too_long
virtual byte[] GetBytes(char[] chars)
int GetMaxByteCount(int charCount)
static IAsyncResult Begin(Task task, AsyncCallback callback, object state)
static void End(IAsyncResult asyncResult)
new ConfiguredTaskAwaitable< TResult > ConfigureAwait(bool continueOnCapturedContext)
new IEnumerator< T > GetEnumerator()
static CancellationToken None