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

◆ InternalReadContentAsString()

string System.Xml.XmlReader.InternalReadContentAsString ( )
inlinepackageinherited

Definition at line 1223 of file XmlReader.cs.

1224 {
1225 string text = string.Empty;
1227 bool num;
1228 do
1229 {
1230 switch (NodeType)
1231 {
1232 case XmlNodeType.Attribute:
1233 return Value;
1234 case XmlNodeType.Text:
1235 case XmlNodeType.CDATA:
1236 case XmlNodeType.Whitespace:
1237 case XmlNodeType.SignificantWhitespace:
1238 if (text.Length == 0)
1239 {
1240 text = Value;
1241 }
1242 else
1243 {
1244 if (stringBuilder == null)
1245 {
1247 stringBuilder.Append(text);
1248 }
1249 stringBuilder.Append(Value);
1250 }
1251 goto case XmlNodeType.ProcessingInstruction;
1252 case XmlNodeType.EntityReference:
1253 if (!CanResolveEntity)
1254 {
1255 break;
1256 }
1257 ResolveEntity();
1258 goto case XmlNodeType.ProcessingInstruction;
1259 case XmlNodeType.ProcessingInstruction:
1260 case XmlNodeType.Comment:
1261 case XmlNodeType.EndEntity:
1262 num = ((AttributeCount != 0) ? ReadAttributeValue() : Read());
1263 continue;
1264 }
1265 break;
1266 }
1267 while (num);
1268 if (stringBuilder != null)
1269 {
1270 return stringBuilder.ToString();
1271 }
1272 return text;
1273 }
virtual bool CanResolveEntity
Definition XmlReader.cs:118
XmlNodeType NodeType
Definition XmlReader.cs:62

References System.Xml.XmlReader.AttributeCount, System.Xml.XmlReader.CanResolveEntity, System.Xml.Dictionary, System.Xml.XmlReader.NodeType, System.Xml.XmlReader.Read(), System.Xml.XmlReader.ReadAttributeValue(), System.Xml.XmlReader.ResolveEntity(), System.text, and System.Xml.XmlReader.Value.

Referenced by System.Xml.XsdValidatingReader.InternalReadContentAsObject(), System.Xml.XmlReader.ReadContentAs(), System.Xml.XmlReader.ReadContentAsBoolean(), System.Xml.XmlReader.ReadContentAsDateTime(), System.Xml.XmlReader.ReadContentAsDateTimeOffset(), System.Xml.XmlReader.ReadContentAsDecimal(), System.Xml.XmlReader.ReadContentAsDouble(), System.Xml.XmlReader.ReadContentAsFloat(), System.Xml.XmlReader.ReadContentAsInt(), System.Xml.XmlReader.ReadContentAsLong(), System.Xml.XmlReader.ReadContentAsObject(), System.Xml.XmlReader.ReadContentAsString(), and System.Xml.XsdCachingReader.ReadOriginalContentAsString().