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

◆ Convert() [2/3]

override void System.Xml.Ucs4Decoder.Convert ( byte[] bytes,
int byteIndex,
int byteCount,
char[] chars,
int charIndex,
int charCount,
bool flush,
out int bytesUsed,
out int charsUsed,
out bool completed )
inlinevirtualinherited

Reimplemented from System.Text.Decoder.

Definition at line 55 of file Ucs4Decoder.cs.

56 {
57 bytesUsed = 0;
58 charsUsed = 0;
59 int num = 0;
60 int i = lastBytesCount;
61 if (i > 0)
62 {
63 for (; i < 4; i++)
64 {
65 if (byteCount <= 0)
66 {
67 break;
68 }
70 byteIndex++;
71 byteCount--;
72 bytesUsed++;
73 }
74 if (i < 4)
75 {
77 completed = true;
78 return;
79 }
81 charIndex += num;
82 charCount -= num;
83 charsUsed = num;
85 }
86 else
87 {
88 num = 0;
89 }
90 if (charCount * 4 < byteCount)
91 {
92 byteCount = charCount * 4;
93 completed = false;
94 }
95 else
96 {
97 completed = true;
98 }
99 bytesUsed += byteCount;
100 charsUsed = GetFullChars(bytes, byteIndex, byteCount, chars, charIndex) + num;
101 int num2 = byteCount & 3;
102 if (num2 >= 0)
103 {
104 for (int j = 0; j < num2; j++)
105 {
107 }
109 }
110 }
int GetFullChars(byte[] bytes, int byteIndex, int byteCount, char[] chars, int charIndex)

References System.byteCount, System.byteIndex, System.bytes, System.charCount, System.charIndex, System.chars, System.Xml.Dictionary, System.Xml.Ucs4Decoder.GetFullChars(), System.Xml.Ucs4Decoder.lastBytes, and System.Xml.Ucs4Decoder.lastBytesCount.