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

◆ WriteBase64AsyncImpl()

async Task System.Xml.XmlBaseWriter.WriteBase64AsyncImpl ( byte[] buffer,
int offset,
int count )
inlineprivateinherited

Definition at line 2399 of file XmlBaseWriter.cs.

2400 {
2401 if (count <= 0)
2402 {
2403 return;
2404 }
2405 if (_trailByteCount > 0)
2406 {
2408 {
2410 count--;
2411 }
2412 }
2415 if (_trailBytes == null)
2416 {
2417 _trailBytes = new byte[3];
2418 }
2419 if (actualByteCount >= 3)
2420 {
2421 if (_attributeValue != null)
2422 {
2423 WriteAttributeText(XmlConverter.Base64Encoding.GetString(_trailBytes, 0, _trailByteCount));
2424 WriteAttributeText(XmlConverter.Base64Encoding.GetString(buffer, offset, actualByteCount - _trailByteCount));
2425 }
2426 if (!_isXmlnsAttribute)
2427 {
2430 EndContent();
2431 }
2433 if (_trailByteCount > 0)
2434 {
2435 int num = offset + count - _trailByteCount;
2436 for (int i = 0; i < _trailByteCount; i++)
2437 {
2438 _trailBytes[i] = buffer[num++];
2439 }
2440 }
2441 }
2442 else
2443 {
2446 }
2447 }
new ConfiguredTaskAwaitable< TResult > ConfigureAwait(bool continueOnCapturedContext)
Definition Task.cs:226
void WriteAttributeText(string value)
virtual Task WriteBase64TextAsync(byte[] trailBuffer, int trailCount, byte[] buffer, int offset, int count)

References System.Xml.XmlBaseWriter._attributeValue, System.Xml.XmlBaseWriter._isXmlnsAttribute, System.Xml.XmlBaseWriter._trailByteCount, System.Xml.XmlBaseWriter._trailBytes, System.Xml.XmlBaseWriter._writer, System.Xml.XmlConverter.Base64Encoding, System.Buffer.BlockCopy(), System.buffer, System.Threading.Tasks.Task< TResult >.ConfigureAwait(), System.count, System.Xml.Dictionary, System.Xml.XmlBaseWriter.EndContent(), System.offset, System.Xml.XmlBaseWriter.StartContentAsync(), System.Xml.XmlBaseWriter.WriteAttributeText(), and System.Xml.XmlNodeWriter.WriteBase64TextAsync().

Referenced by System.Xml.XmlBaseWriter.WriteBase64Async().