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

◆ CheckText()

XmlNodeType System.Xml.XmlSqlBinaryReader.CheckText ( bool attr)
inlineprivate

Definition at line 3275 of file XmlSqlBinaryReader.cs.

3276 {
3278 if (!attr)
3279 {
3280 while (true)
3281 {
3283 {
3284 if (!_xmlspacePreserve)
3285 {
3286 return XmlNodeType.Whitespace;
3287 }
3288 return XmlNodeType.SignificantWhitespace;
3289 }
3290 if (value > 255 || !XmlCharType.IsWhiteSpace((char)value))
3291 {
3292 break;
3293 }
3294 source = source.Slice(2);
3295 }
3296 }
3297 char c;
3298 ushort value3;
3299 while (true)
3300 {
3302 {
3303 return XmlNodeType.Text;
3304 }
3305 source = source.Slice(2);
3306 c = (char)value2;
3307 if (!XmlCharType.IsCharData(c))
3308 {
3309 if (!XmlCharType.IsHighSurrogate(c))
3310 {
3311 throw XmlConvert.CreateInvalidCharException(c, '\0', ExceptionType.XmlException);
3312 }
3314 {
3316 }
3317 if (!XmlCharType.IsLowSurrogate(value3))
3318 {
3319 break;
3320 }
3321 source = source.Slice(2);
3322 }
3323 }
3324 throw XmlConvert.CreateInvalidSurrogatePairException(c, (char)value3);
3325 }
static bool TryReadUInt16LittleEndian(ReadOnlySpan< byte > source, out ushort value)
static string Xml_InvalidSurrogateMissingLowChar
Definition SR.cs:324
Definition SR.cs:7
Exception ThrowXmlException(string res)

References System.Xml.XmlSqlBinaryReader._data, System.Xml.XmlSqlBinaryReader._end, System.Xml.XmlSqlBinaryReader._tokDataPos, System.Xml.XmlSqlBinaryReader._xmlspacePreserve, System.Xml.XmlConvert.CreateInvalidCharException(), System.Xml.XmlConvert.CreateInvalidSurrogatePairException(), System.Xml.Dictionary, System.Xml.XmlCharType.IsCharData(), System.Xml.XmlCharType.IsHighSurrogate(), System.Xml.XmlCharType.IsLowSurrogate(), System.Xml.XmlCharType.IsWhiteSpace(), System.source, System.Xml.XmlSqlBinaryReader.ThrowXmlException(), System.Buffers.Binary.BinaryPrimitives.TryReadUInt16LittleEndian(), System.value, and System.SR.Xml_InvalidSurrogateMissingLowChar.

Referenced by System.Xml.XmlSqlBinaryReader.ScanOverValue().