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

◆ WriteAttributeTextBlock()

unsafe void System.Xml.XmlUtf8RawTextWriter.WriteAttributeTextBlock ( char * pSrc,
char * pSrcEnd )
inlineprotectedinherited

Definition at line 530 of file XmlUtf8RawTextWriter.cs.

531 {
532 fixed (byte* ptr = _bufBytes)
533 {
534 byte* ptr2 = ptr + _bufPos;
535 int num = 0;
536 while (true)
537 {
538 byte* ptr3 = ptr2 + (pSrcEnd - pSrc);
539 if (ptr3 > ptr + _bufLen)
540 {
541 ptr3 = ptr + _bufLen;
542 }
543 while (ptr2 < ptr3 && XmlCharType.IsAttributeValueChar((char)(num = *pSrc)) && num <= 127)
544 {
545 *ptr2 = (byte)num;
546 ptr2++;
547 pSrc++;
548 }
549 if (pSrc >= pSrcEnd)
550 {
551 break;
552 }
553 if (ptr2 >= ptr3)
554 {
555 _bufPos = (int)(ptr2 - ptr);
556 FlushBuffer();
557 ptr2 = ptr + 1;
558 continue;
559 }
560 switch (num)
561 {
562 case 38:
564 break;
565 case 60:
566 ptr2 = LtEntity(ptr2);
567 break;
568 case 62:
569 ptr2 = GtEntity(ptr2);
570 break;
571 case 34:
573 break;
574 case 39:
575 *ptr2 = (byte)num;
576 ptr2++;
577 break;
578 case 9:
579 if (_newLineHandling == NewLineHandling.None)
580 {
581 *ptr2 = (byte)num;
582 ptr2++;
583 }
584 else
585 {
587 }
588 break;
589 case 13:
590 if (_newLineHandling == NewLineHandling.None)
591 {
592 *ptr2 = (byte)num;
593 ptr2++;
594 }
595 else
596 {
598 }
599 break;
600 case 10:
601 if (_newLineHandling == NewLineHandling.None)
602 {
603 *ptr2 = (byte)num;
604 ptr2++;
605 }
606 else
607 {
609 }
610 break;
611 default:
612 if (XmlCharType.IsSurrogate(num))
613 {
615 pSrc += 2;
616 }
617 else if (num <= 127 || num >= 65534)
618 {
620 pSrc++;
621 }
622 else
623 {
625 pSrc++;
626 }
627 continue;
628 }
629 pSrc++;
630 }
631 _bufPos = (int)(ptr2 - ptr);
632 }
633 }
static unsafe byte * AmpEntity(byte *pDst)
static unsafe byte * CarriageReturnEntity(byte *pDst)
unsafe byte * InvalidXmlChar(int ch, byte *pDst, bool entitize)
static unsafe byte * LtEntity(byte *pDst)
static unsafe byte * GtEntity(byte *pDst)
static unsafe byte * QuoteEntity(byte *pDst)
static unsafe byte * TabEntity(byte *pDst)
static unsafe byte * LineFeedEntity(byte *pDst)
static unsafe byte * EncodeMultibyteUTF8(int ch, byte *pDst)
static unsafe byte * EncodeSurrogate(char *pSrc, char *pSrcEnd, byte *pDst)

References System.Xml.XmlUtf8RawTextWriter._bufBytes, System.Xml.XmlUtf8RawTextWriter._bufLen, System.Xml.XmlUtf8RawTextWriter._bufPos, System.Xml.XmlUtf8RawTextWriter._newLineHandling, System.Xml.XmlUtf8RawTextWriter.AmpEntity(), System.Xml.XmlUtf8RawTextWriter.CarriageReturnEntity(), System.Xml.Dictionary, System.Xml.XmlUtf8RawTextWriter.EncodeMultibyteUTF8(), System.Xml.XmlUtf8RawTextWriter.EncodeSurrogate(), System.Xml.XmlUtf8RawTextWriter.FlushBuffer(), System.Xml.XmlUtf8RawTextWriter.GtEntity(), System.Xml.XmlUtf8RawTextWriter.InvalidXmlChar(), System.Xml.XmlCharType.IsAttributeValueChar(), System.Xml.XmlCharType.IsSurrogate(), System.Xml.XmlUtf8RawTextWriter.LineFeedEntity(), System.Xml.XmlUtf8RawTextWriter.LtEntity(), System.Xml.XmlUtf8RawTextWriter.QuoteEntity(), and System.Xml.XmlUtf8RawTextWriter.TabEntity().

Referenced by System.Xml.HtmlUtf8RawTextWriter.WriteChars(), System.Xml.XmlUtf8RawTextWriter.WriteChars(), System.Xml.HtmlUtf8RawTextWriter.WriteHtmlAttributeTextBlock(), System.Xml.XmlUtf8RawTextWriter.WriteString(), and System.Xml.XmlUtf8RawTextWriter.WriteWhitespace().