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

◆ GetElementInScope()

XElement System.Xml.Linq.XNodeReader.GetElementInScope ( )
inlineprivate

Definition at line 1000 of file XNodeReader.cs.

1001 {
1002 if (_source is XElement result)
1003 {
1004 return result;
1005 }
1006 if (_source is XNode xNode)
1007 {
1008 return xNode.parent as XElement;
1009 }
1010 if (_source is XAttribute xAttribute)
1011 {
1012 return (XElement)xAttribute.parent;
1013 }
1014 if (_parent is XElement result2)
1015 {
1016 return result2;
1017 }
1018 if (_parent is XAttribute xAttribute2)
1019 {
1020 return (XElement)xAttribute2.parent;
1021 }
1022 return null;
1023 }

References System.Xml.Linq.XNodeReader._parent, System.Xml.Linq.XNodeReader._source, System.Xml.Dictionary, and System.Xml.Linq.XObject.parent.

Referenced by System.Xml.Linq.XNodeReader.LookupNamespace().