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

◆ ReadElementContentAsBoolean() [1/2]

override bool System.Xml.XmlBinaryReader.ReadElementContentAsBoolean ( )
inlinevirtual

Reimplemented from System.Xml.XmlReader.

Definition at line 113 of file XmlBinaryReader.cs.

114 {
115 if (base.Node.NodeType != XmlNodeType.Element)
116 {
118 }
120 {
121 return base.ReadElementContentAsBoolean();
122 }
123 bool result;
124 switch (GetNodeType())
125 {
126 case XmlBinaryNodeType.TrueTextWithEndElement:
127 SkipNodeType();
128 result = true;
130 break;
131 case XmlBinaryNodeType.FalseTextWithEndElement:
132 SkipNodeType();
133 result = false;
135 break;
136 case XmlBinaryNodeType.BoolTextWithEndElement:
137 SkipNodeType();
138 result = base.BufferReader.ReadUInt8() != 0;
140 break;
141 default:
142 result = base.ReadElementContentAsBoolean();
143 break;
144 }
145 return result;
146 }
XmlBinaryNodeType GetNodeType()

References System.Xml.XmlBinaryReader.CanOptimizeReadElementContent(), System.Xml.Dictionary, System.Xml.XmlBinaryReader.GetNodeType(), System.Xml.XmlDictionaryReader.MoveToStartElement(), System.Xml.XmlBinaryReader.ReadTextWithEndElement(), and System.Xml.XmlBinaryReader.SkipNodeType().