System.Xml.DocumentXPathNavigator.MoveToFirstNamespaceGlobal C# (CSharp) Méthode

MoveToFirstNamespaceGlobal() private static méthode

private static MoveToFirstNamespaceGlobal ( XmlAttributeCollection &attributes, int &index ) : bool
attributes XmlAttributeCollection
index int
Résultat bool
        private static bool MoveToFirstNamespaceGlobal(ref XmlAttributeCollection attributes, ref int index) {
            if (MoveToFirstNamespaceLocal(attributes, ref index)) {
                return true;
            }

            Debug.Assert(attributes != null && attributes.parent != null);
            XmlElement element = attributes.parent.ParentNode as XmlElement;
            while (element != null) {
                if (element.HasAttributes) {
                    attributes = element.Attributes; 
                    if (MoveToFirstNamespaceLocal(attributes, ref index)) {
                        return true;
                    }
                }
                element = element.ParentNode as XmlElement;
            }
            return false;
        }