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

◆ InvalidCharRecovery()

void System.Xml.XmlTextReaderImpl.InvalidCharRecovery ( ref int bytesCount,
out int charsCount )
inlineprivate

Definition at line 3586 of file XmlTextReaderImpl.cs.

3587 {
3588 int num = 0;
3589 int i = 0;
3590 try
3591 {
3592 int bytesUsed;
3593 for (; i < bytesCount; i += bytesUsed)
3594 {
3595 _ps.decoder.Convert(_ps.bytes, _ps.bytePos + i, 1, _ps.chars, _ps.charsUsed + num, 2, flush: false, out bytesUsed, out var charsUsed, out var _);
3596 num += charsUsed;
3597 }
3598 }
3599 catch (ArgumentException)
3600 {
3601 }
3602 if (num == 0)
3603 {
3605 }
3606 charsCount = num;
3607 bytesCount = i;
3608 }
static string Xml_InvalidCharInThisEncoding
Definition SR.cs:56
Definition SR.cs:7
virtual void Convert(byte[] bytes, int byteIndex, int byteCount, char[] chars, int charIndex, int charCount, bool flush, out int bytesUsed, out int charsUsed, out bool completed)
Definition Decoder.cs:142
void Throw(int pos, string res, string arg)

References System.Xml.XmlTextReaderImpl._ps, System.Xml.XmlTextReaderImpl.ParsingState.bytePos, System.Xml.XmlTextReaderImpl.ParsingState.bytes, System.Xml.XmlTextReaderImpl.ParsingState.chars, System.Xml.XmlTextReaderImpl.ParsingState.charsUsed, System.Text.Decoder.Convert(), System.Xml.XmlTextReaderImpl.ParsingState.decoder, System.Xml.Dictionary, System.Xml.XmlTextReaderImpl.Throw(), and System.SR.Xml_InvalidCharInThisEncoding.

Referenced by System.Xml.XmlTextReaderImpl.GetChars().