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

◆ MoveToNextNamespace() [2/2]

override bool System.Xml.DocumentXPathNavigator.MoveToNextNamespace ( XPathNamespaceScope scope)
inline

Definition at line 527 of file DocumentXPathNavigator.cs.

528 {
529 if (!(_source is XmlAttribute { IsNamespace: not false } xmlAttribute))
530 {
531 return false;
532 }
535 {
536 return false;
537 }
538 switch (scope)
539 {
540 case XPathNamespaceScope.Local:
541 if (xmlAttribute.OwnerElement != _namespaceParent)
542 {
543 return false;
544 }
545 if (!MoveToNextNamespaceLocal(attributes, ref index))
546 {
547 return false;
548 }
549 _source = attributes[index];
551 break;
552 case XPathNamespaceScope.ExcludeXml:
553 {
554 XmlAttribute xmlAttribute2;
555 string localName;
556 do
557 {
558 if (!MoveToNextNamespaceGlobal(ref attributes, ref index))
559 {
560 return false;
561 }
562 xmlAttribute2 = attributes[index];
563 localName = xmlAttribute2.LocalName;
564 }
565 while (PathHasDuplicateNamespace(xmlAttribute2.OwnerElement, _namespaceParent, localName) || Ref.Equal(localName, _document.strXml));
568 break;
569 }
570 case XPathNamespaceScope.All:
571 {
572 XmlAttribute xmlAttribute2;
573 do
574 {
575 if (!MoveToNextNamespaceGlobal(ref attributes, ref index))
576 {
578 {
579 return false;
580 }
582 return true;
583 }
584 xmlAttribute2 = attributes[index];
585 }
589 break;
590 }
591 default:
592 return false;
593 }
594 return true;
595 }
static bool MoveToNextNamespaceLocal(XmlAttributeCollection attributes, ref int index)
static bool ResetAttributePosition(XmlAttribute attribute, [NotNullWhen(true)] XmlAttributeCollection attributes, out int index)
static bool MoveToNextNamespaceGlobal(ref XmlAttributeCollection attributes, ref int index)
static bool CheckAttributePosition(XmlAttribute attribute, [NotNullWhen(true)] out XmlAttributeCollection attributes, int index)
bool PathHasDuplicateNamespace(XmlElement top, XmlElement bottom, string localName)
XmlAttribute NamespaceXml

References System.Xml.DocumentXPathNavigator._attributeIndex, System.Xml.DocumentXPathNavigator._document, System.Xml.DocumentXPathNavigator._namespaceParent, System.Xml.DocumentXPathNavigator._source, System.Xml.DocumentXPathNavigator.CheckAttributePosition(), System.Xml.Dictionary, System.Xml.Ref.Equal(), System.index, System.Xml.DocumentXPathNavigator.MoveToNextNamespaceGlobal(), System.Xml.DocumentXPathNavigator.MoveToNextNamespaceLocal(), System.Xml.XmlDocument.NamespaceXml, System.Xml.DocumentXPathNavigator.PathHasDuplicateNamespace(), System.Xml.DocumentXPathNavigator.ResetAttributePosition(), and System.Xml.XmlDocument.strXml.