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

◆ ParseElementAsync_SetElement()

Task System.Xml.XmlTextReaderImpl.ParseElementAsync_SetElement ( int colonPos,
int pos )
inlineprivate

Definition at line 10174 of file XmlTextReaderImpl.cs.

10175 {
10176 char[] chars = _ps.chars;
10178 if (colonPos == -1 || !_supportNamespaces)
10179 {
10180 _curNode.SetNamedNode(XmlNodeType.Element, _nameTable.Add(chars, _ps.charPos, pos - _ps.charPos));
10181 }
10182 else
10183 {
10184 int charPos = _ps.charPos;
10185 int num = colonPos - charPos;
10186 if (num == _lastPrefix.Length && XmlConvert.StrEqual(chars, charPos, num, _lastPrefix))
10187 {
10188 _curNode.SetNamedNode(XmlNodeType.Element, _nameTable.Add(chars, colonPos + 1, pos - colonPos - 1), _lastPrefix, null);
10189 }
10190 else
10191 {
10192 _curNode.SetNamedNode(XmlNodeType.Element, _nameTable.Add(chars, colonPos + 1, pos - colonPos - 1), _nameTable.Add(chars, _ps.charPos, num), null);
10194 }
10195 }
10196 char ch = chars[pos];
10197 bool flag = XmlCharType.IsWhiteSpace(ch);
10198 _ps.charPos = pos;
10199 if (flag)
10200 {
10201 return ParseAttributesAsync();
10202 }
10204 }
string Add(char[] array, int offset, int length)
void SetNamedNode(XmlNodeType type, string localName)
XmlNamespaceManager _namespaceManager

References System.Xml.XmlTextReaderImpl._curNode, System.Xml.XmlTextReaderImpl._lastPrefix, System.Xml.XmlTextReaderImpl._namespaceManager, System.Xml.XmlTextReaderImpl._nameTable, System.Xml.XmlTextReaderImpl._ps, System.Xml.XmlTextReaderImpl._supportNamespaces, System.Xml.XmlNameTable.Add(), System.ch, System.Xml.XmlTextReaderImpl.ParsingState.charPos, System.chars, System.Xml.XmlTextReaderImpl.ParsingState.chars, System.Xml.Dictionary, System.Xml.XmlCharType.IsWhiteSpace(), System.Xml.XmlTextReaderImpl.ParseAttributesAsync(), System.Xml.XmlTextReaderImpl.ParseElementAsync_NoAttributes(), System.Xml.XmlTextReaderImpl.NodeData.prefix, System.Xml.XmlNamespaceManager.PushScope(), System.Xml.XmlTextReaderImpl.NodeData.SetNamedNode(), and System.Xml.XmlConvert.StrEqual().

Referenced by System.Xml.XmlTextReaderImpl._ParseElementAsync_ContinueWithSetElement(), System.Xml.XmlTextReaderImpl.ParseElementAsync(), and System.Xml.XmlTextReaderImpl.ParseElementAsync_ContinueWithSetElement().