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

◆ ReadElementContentAsInt() [1/2]

override int System.Xml.XmlBinaryReader.ReadElementContentAsInt ( )
inlinevirtual

Reimplemented from System.Xml.XmlReader.

Definition at line 148 of file XmlBinaryReader.cs.

149 {
150 if (base.Node.NodeType != XmlNodeType.Element)
151 {
153 }
155 {
156 return base.ReadElementContentAsInt();
157 }
158 int result;
159 switch (GetNodeType())
160 {
161 case XmlBinaryNodeType.ZeroTextWithEndElement:
162 SkipNodeType();
163 result = 0;
165 break;
166 case XmlBinaryNodeType.OneTextWithEndElement:
167 SkipNodeType();
168 result = 1;
170 break;
171 case XmlBinaryNodeType.Int8TextWithEndElement:
172 SkipNodeType();
173 result = base.BufferReader.ReadInt8();
175 break;
176 case XmlBinaryNodeType.Int16TextWithEndElement:
177 SkipNodeType();
178 result = base.BufferReader.ReadInt16();
180 break;
181 case XmlBinaryNodeType.Int32TextWithEndElement:
182 SkipNodeType();
183 result = base.BufferReader.ReadInt32();
185 break;
186 default:
187 result = base.ReadElementContentAsInt();
188 break;
189 }
190 return result;
191 }
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().