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

◆ RawTextNoFlush() [1/2]

unsafe int System.Xml.XmlEncodedRawTextWriter.RawTextNoFlush ( char * pSrcBegin,
char * pSrcEnd )
inlineprotectedinherited

Definition at line 2564 of file XmlEncodedRawTextWriter.cs.

2565 {
2566 fixed (char* ptr = _bufChars)
2567 {
2568 char* ptr2 = ptr + _bufPos;
2569 char* ptr3 = pSrcBegin;
2570 int num = 0;
2571 while (true)
2572 {
2573 char* ptr4 = ptr2 + (pSrcEnd - ptr3);
2574 if (ptr4 > ptr + _bufLen)
2575 {
2576 ptr4 = ptr + _bufLen;
2577 }
2578 for (; ptr2 < ptr4; ptr2++)
2579 {
2580 if ((num = *ptr3) >= 55296)
2581 {
2582 break;
2583 }
2584 ptr3++;
2585 *ptr2 = (char)num;
2586 }
2587 if (ptr3 >= pSrcEnd)
2588 {
2589 break;
2590 }
2591 if (ptr2 >= ptr4)
2592 {
2593 _bufPos = (int)(ptr2 - ptr);
2594 return (int)(ptr3 - pSrcBegin);
2595 }
2596 if (XmlCharType.IsSurrogate(num))
2597 {
2599 ptr3 += 2;
2600 }
2601 else if (num <= 127 || num >= 65534)
2602 {
2604 ptr3++;
2605 }
2606 else
2607 {
2608 *ptr2 = (char)num;
2609 ptr2++;
2610 ptr3++;
2611 }
2612 }
2613 _bufPos = (int)(ptr2 - ptr);
2614 }
2615 return -1;
2616 }
unsafe char * InvalidXmlChar(int ch, char *pDst, bool entitize)
static unsafe char * EncodeSurrogate(char *pSrc, char *pSrcEnd, char *pDst)

References System.Xml.XmlEncodedRawTextWriter._bufChars, System.Xml.XmlEncodedRawTextWriter._bufLen, System.Xml.XmlEncodedRawTextWriter._bufPos, System.Xml.Dictionary, System.Xml.XmlEncodedRawTextWriter.EncodeSurrogate(), System.Xml.XmlEncodedRawTextWriter.InvalidXmlChar(), and System.Xml.XmlCharType.IsSurrogate().

Referenced by System.Xml.XmlEncodedRawTextWriter._RawTextAsync(), System.Xml.XmlEncodedRawTextWriter.RawTextAsync(), System.Xml.XmlEncodedRawTextWriter.RawTextAsync(), and System.Xml.XmlEncodedRawTextWriter.RawTextNoFlush().