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

◆ GetAttribute() [2/4]

override string System.Xml.Linq.XNodeReader.GetAttribute ( string localName,
string namespaceName )
inline

Definition at line 530 of file XNodeReader.cs.

531 {
532 if (!IsInteractive)
533 {
534 return null;
535 }
537 if (elementInAttributeScope != null)
538 {
539 if (localName == "xmlns")
540 {
541 if (namespaceName != null && namespaceName.Length == 0)
542 {
543 return null;
544 }
545 if (namespaceName == "http://www.w3.org/2000/xmlns/")
546 {
547 namespaceName = string.Empty;
548 }
549 }
550 XAttribute xAttribute = elementInAttributeScope.lastAttr;
551 if (xAttribute != null)
552 {
553 do
554 {
555 xAttribute = xAttribute.next;
556 if (xAttribute.Name.LocalName == localName && xAttribute.Name.NamespaceName == namespaceName)
557 {
559 {
560 return null;
561 }
562 return xAttribute.Value;
563 }
564 }
565 while (xAttribute != elementInAttributeScope.lastAttr);
566 }
567 }
568 return null;
569 }
bool IsDuplicateNamespaceAttribute(XAttribute candidateAttribute)
XElement GetElementInAttributeScope()
readonly bool _omitDuplicateNamespaces

References System.Xml.Linq.XNodeReader._omitDuplicateNamespaces, System.Xml.Dictionary, System.Xml.Linq.XNodeReader.GetElementInAttributeScope(), System.Xml.Linq.XNodeReader.IsDuplicateNamespaceAttribute(), System.Xml.Linq.XNodeReader.IsInteractive, System.Xml.Linq.XAttribute.next, and System.Xml.Linq.XAttribute.Value.