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

◆ WriteBase64Indented() [3/3]

void System.Text.Json.Utf8JsonWriter.WriteBase64Indented ( ReadOnlySpan< char > escapedPropertyName,
ReadOnlySpan< byte > bytes )
inlineprivate

Definition at line 780 of file Utf8JsonWriter.cs.

781 {
785 if (_memory.Length - BytesPending < num)
786 {
787 Grow(num);
788 }
789 Span<byte> span = _memory.Span;
790 if (_currentDepth < 0)
791 {
792 span[BytesPending++] = 44;
793 }
794 if (_tokenType != 0)
795 {
797 }
798 JsonWriterHelper.WriteIndentation(span.Slice(BytesPending), indentation);
800 span[BytesPending++] = 34;
802 span[BytesPending++] = 34;
803 span[BytesPending++] = 58;
804 span[BytesPending++] = 32;
805 span[BytesPending++] = 34;
807 span[BytesPending++] = 34;
808 }
static int GetMaxEncodedToUtf8Length(int length)
Definition Base64.cs:502
static readonly int s_newLineLength
void Grow(int requiredSize)
void Base64EncodeAndWrite(ReadOnlySpan< byte > bytes, Span< byte > output, int encodingLength)
void WriteNewLine(Span< byte > output)
void TranscodeAndWrite(ReadOnlySpan< char > escapedPropertyName, Span< byte > output)
unsafe Span< T > Span
Definition Memory.cs:28

References System.Text.Json.Utf8JsonWriter._currentDepth, System.Text.Json.Utf8JsonWriter._memory, System.Text.Json.Utf8JsonWriter._tokenType, System.Text.Json.Utf8JsonWriter.Base64EncodeAndWrite(), System.bytes, System.Text.Json.Utf8JsonWriter.BytesPending, System.Text.Json.Dictionary, System.Buffers.Text.Base64.GetMaxEncodedToUtf8Length(), System.Text.Json.Utf8JsonWriter.Grow(), System.Text.Json.Utf8JsonWriter.Indentation, System.Memory< T >.Length, System.Text.Json.Utf8JsonWriter.s_newLineLength, System.Memory< T >.Span, System.Text.Json.Utf8JsonWriter.TranscodeAndWrite(), System.Text.Json.JsonWriterHelper.WriteIndentation(), and System.Text.Json.Utf8JsonWriter.WriteNewLine().

Referenced by System.Text.Json.Utf8JsonWriter.WriteBase64ByOptions(), System.Text.Json.Utf8JsonWriter.WriteBase64ByOptions(), and System.Text.Json.Utf8JsonWriter.WriteBase64ByOptions().