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

◆ Replay()

void System.Xml.XmlWellFormedWriter.AttributeValueCache.Replay ( XmlWriter writer)
inlinepackage

Definition at line 435 of file XmlWellFormedWriter.cs.

436 {
437 if (_singleStringValue != null)
438 {
439 writer.WriteString(_singleStringValue);
440 return;
441 }
442 for (int i = _firstItem; i <= _lastItem; i++)
443 {
444 Item item = _items[i];
445 switch (item.type)
446 {
447 case ItemType.EntityRef:
448 writer.WriteEntityRef((string)item.data);
449 break;
450 case ItemType.CharEntity:
451 writer.WriteCharEntity((char)item.data);
452 break;
453 case ItemType.SurrogateCharEntity:
454 {
455 char[] array = (char[])item.data;
456 writer.WriteSurrogateCharEntity(array[0], array[1]);
457 break;
458 }
459 case ItemType.Whitespace:
460 writer.WriteWhitespace((string)item.data);
461 break;
462 case ItemType.String:
463 writer.WriteString((string)item.data);
464 break;
465 case ItemType.StringChars:
466 {
467 BufferChunk bufferChunk = (BufferChunk)item.data;
468 writer.WriteChars(bufferChunk.buffer, bufferChunk.index, bufferChunk.count);
469 break;
470 }
471 case ItemType.Raw:
472 writer.WriteRaw((string)item.data);
473 break;
474 case ItemType.RawChars:
475 {
476 BufferChunk bufferChunk = (BufferChunk)item.data;
477 writer.WriteChars(bufferChunk.buffer, bufferChunk.index, bufferChunk.count);
478 break;
479 }
480 case ItemType.ValueString:
481 writer.WriteValue((string)item.data);
482 break;
483 }
484 }
485 }

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

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