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

◆ ReplayAsync()

async Task System.Xml.XmlWellFormedWriter.AttributeValueCache.ReplayAsync ( XmlWriter writer)
inlinepackage

Definition at line 612 of file XmlWellFormedWriter.cs.

613 {
614 if (_singleStringValue != null)
615 {
616 await writer.WriteStringAsync(_singleStringValue).ConfigureAwait(continueOnCapturedContext: false);
617 return;
618 }
619 for (int i = _firstItem; i <= _lastItem; i++)
620 {
621 Item item = _items[i];
622 switch (item.type)
623 {
624 case ItemType.EntityRef:
625 await writer.WriteEntityRefAsync((string)item.data).ConfigureAwait(continueOnCapturedContext: false);
626 break;
627 case ItemType.CharEntity:
628 await writer.WriteCharEntityAsync((char)item.data).ConfigureAwait(continueOnCapturedContext: false);
629 break;
630 case ItemType.SurrogateCharEntity:
631 {
632 char[] array = (char[])item.data;
633 await writer.WriteSurrogateCharEntityAsync(array[0], array[1]).ConfigureAwait(continueOnCapturedContext: false);
634 break;
635 }
636 case ItemType.Whitespace:
637 await writer.WriteWhitespaceAsync((string)item.data).ConfigureAwait(continueOnCapturedContext: false);
638 break;
639 case ItemType.String:
640 await writer.WriteStringAsync((string)item.data).ConfigureAwait(continueOnCapturedContext: false);
641 break;
642 case ItemType.StringChars:
643 {
644 BufferChunk bufferChunk = (BufferChunk)item.data;
645 await writer.WriteCharsAsync(bufferChunk.buffer, bufferChunk.index, bufferChunk.count).ConfigureAwait(continueOnCapturedContext: false);
646 break;
647 }
648 case ItemType.Raw:
649 await writer.WriteRawAsync((string)item.data).ConfigureAwait(continueOnCapturedContext: false);
650 break;
651 case ItemType.RawChars:
652 {
653 BufferChunk bufferChunk = (BufferChunk)item.data;
654 await writer.WriteCharsAsync(bufferChunk.buffer, bufferChunk.index, bufferChunk.count).ConfigureAwait(continueOnCapturedContext: false);
655 break;
656 }
657 case ItemType.ValueString:
658 await writer.WriteStringAsync((string)item.data).ConfigureAwait(continueOnCapturedContext: false);
659 break;
660 }
661 }
662 }

References System.Xml.XmlWellFormedWriter.AttributeValueCache._firstItem, System.Xml.XmlWellFormedWriter.AttributeValueCache._items, System.Xml.XmlWellFormedWriter.AttributeValueCache._lastItem, System.Xml.XmlWellFormedWriter.AttributeValueCache._singleStringValue, System.array, System.item, and System.writer.

Referenced by System.Xml.XmlWellFormedWriter.WriteEndAttributeAsync_SepcialAtt().