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

◆ InternalWriteBase64TextAsync()

async Task System.Xml.XmlUTF8NodeWriter.InternalWriteBase64TextAsync ( byte[] buffer,
int offset,
int count )
inlineprivate

Definition at line 736 of file XmlUTF8NodeWriter.cs.

737 {
738 Base64Encoding encoding = XmlConverter.Base64Encoding;
739 while (count >= 3)
740 {
741 int byteCount = Math.Min(384, count - count % 3);
742 int count2 = byteCount / 3 * 4;
743 BytesWithOffset bytesWithOffset = await GetBufferAsync(count2).ConfigureAwait(continueOnCapturedContext: false);
744 byte[] bytes = bytesWithOffset.Bytes;
745 int offset2 = bytesWithOffset.Offset;
747 offset += byteCount;
748 count -= byteCount;
749 }
750 if (count > 0)
751 {
752 BytesWithOffset bytesWithOffset2 = await GetBufferAsync(4).ConfigureAwait(continueOnCapturedContext: false);
753 byte[] bytes2 = bytesWithOffset2.Bytes;
754 int offset3 = bytesWithOffset2.Offset;
756 }
757 }
unsafe override int GetChars(byte[] bytes, int byteIndex, int byteCount, char[] chars, int charIndex)
async Task< BytesWithOffset > GetBufferAsync(int count)

References System.Xml.XmlStreamNodeWriter.Advance(), System.Xml.XmlConverter.Base64Encoding, System.buffer, System.byteCount, System.bytes, System.Xml.BytesWithOffset.Bytes, System.count, System.Xml.Dictionary, System.Xml.XmlStreamNodeWriter.GetBufferAsync(), System.Text.Base64Encoding.GetChars(), System.Math.Min(), and System.offset.

Referenced by System.Xml.XmlUTF8NodeWriter.WriteBase64TextAsync().