24 return destination.Slice(0, bytesWritten).ToArray();
42 bytesWritten = bytesWritten2 +
length;
57 return destination.Slice(0, bytesWritten).ToArray();
62 Span<byte> span = ((value.Length >= 256) ? ((
Span<byte>)
new byte[value.Length + 12]) : stackalloc
byte[268]);
66 return destination.Slice(0, bytesWritten).ToArray();
98 Span<byte> span = ((name.Length >= 256) ? ((
Span<byte>)
new byte[name.Length + 6]) : stackalloc
byte[262]);
107 Span<byte> span = ((name.Length + value.Length >= 256) ? ((
Span<byte>)
new byte[name.Length + value.Length + 12]) : stackalloc
byte[268]);
111 return destination.Slice(0, bytesWritten).ToArray();
125 if (valueEncoding ==
null)
133 length = bytesWritten + num;
157 num = separator.Length * (values.Length - 1);
159 for (
int i = 0; i < readOnlySpan.Length; i++)
161 string text = readOnlySpan[i];
167 num = valueEncoding.
GetByteCount(separator) * (values.Length - 1);
169 for (
int j = 0; j < readOnlySpan2.
Length; j++)
171 string s = readOnlySpan2[j];
181 if (valueEncoding ==
null)
186 for (
int k = 1; k <
values.Length; k++)
199 for (
int l = 1; l <
values.Length; l++)
207 length = bytesWritten + num;
218 for (
int i = 0; i <
s.Length; i++)
239 for (
int i = 0; i <
s.Length; i++)
242 if ((uint)(num - 65) <= 25u)
248 length = bytesWritten +
s.Length;
static bool Encode(int value, int numBits, Span< byte > destination, out int bytesWritten)
static bool EncodeStaticIndexedHeaderField(int index, Span< byte > destination, out int bytesWritten)
static bool EncodeValueString(string s, Encoding valueEncoding, Span< byte > buffer, out int length)
static bool EncodeValueString(ReadOnlySpan< string > values, string separator, Encoding valueEncoding, Span< byte > buffer, out int length)
static byte[] EncodeLiteralHeaderFieldWithStaticNameReferenceToArray(int index, string value)
static bool EncodeLiteralHeaderFieldWithStaticNameReference(int index, string value, Span< byte > destination, out int bytesWritten)
static bool EncodeLiteralHeaderFieldWithoutNameReference(string name, string value, Encoding valueEncoding, Span< byte > destination, out int bytesWritten)
static bool EncodeNameString(string s, Span< byte > buffer, out int length)
static bool EncodeLiteralHeaderFieldWithoutNameReference(string name, string value, Span< byte > destination, out int bytesWritten)
static void EncodeValueStringPart(string s, Span< byte > buffer)
static byte[] EncodeLiteralHeaderFieldWithoutNameReferenceToArray(string name, string value)
static byte[] EncodeLiteralHeaderFieldWithoutNameReferenceToArray(string name)
static byte[] EncodeStaticIndexedHeaderFieldToArray(int index)
static bool EncodeLiteralHeaderFieldWithStaticNameReference(int index, string value, Encoding valueEncoding, Span< byte > destination, out int bytesWritten)
static bool EncodeLiteralHeaderFieldWithoutNameReference(string name, ReadOnlySpan< string > values, string valueSeparator, Encoding valueEncoding, Span< byte > destination, out int bytesWritten)
static byte[] EncodeLiteralHeaderFieldWithStaticNameReferenceToArray(int index)
static string net_http_request_invalid_char_encoding
virtual byte[] GetBytes(char[] chars)
virtual int GetByteCount(char[] chars)