Ejemplo n.º 1
0
        private string LookForSiblingIndent(XmlNode currentNode)
        {
            bool   beforeCurrentNode = true;
            string foundIndent       = null;

            foreach (XmlNode node in currentNode.ParentNode.ChildNodes)
            {
                if (node == currentNode)
                {
                    beforeCurrentNode = false;
                }
                else
                {
                    IXmlFormattableAttributes formattable = node as IXmlFormattableAttributes;
                    if (formattable != null)
                    {
                        foundIndent = formattable.AttributeIndent;
                    }
                }

                if (!beforeCurrentNode && foundIndent != null)
                {
                    return(foundIndent);
                }
            }

            return(null);
        }
Ejemplo n.º 2
0
        private string LookForSiblingIndent(XmlNode currentNode)
        {
            bool   flag = true;
            string str  = (string)null;

            foreach (XmlNode xmlNode in currentNode.ParentNode.ChildNodes)
            {
                if (xmlNode == currentNode)
                {
                    flag = false;
                }
                else
                {
                    IXmlFormattableAttributes formattableAttributes = xmlNode as IXmlFormattableAttributes;
                    if (formattableAttributes != null)
                    {
                        str = formattableAttributes.AttributeIndent;
                    }
                }
                if (!flag && str != null)
                {
                    return(str);
                }
            }
            return((string)null);
        }
Ejemplo n.º 3
0
        private void FormatAttributes(XmlNode node)
        {
            IXmlFormattableAttributes formattable = node as IXmlFormattableAttributes;

            if (formattable != null)
            {
                formattable.FormatAttributes(this);
            }
        }
Ejemplo n.º 4
0
        private void FormatAttributes(XmlNode node)
        {
            IXmlFormattableAttributes attributes = node as IXmlFormattableAttributes;

            if (attributes != null)
            {
                attributes.FormatAttributes(this);
            }
        }
Ejemplo n.º 5
0
        private void FormatAttributes(XmlNode node)
        {
            IXmlFormattableAttributes formattableAttributes = node as IXmlFormattableAttributes;

            if (formattableAttributes == null)
            {
                return;
            }
            formattableAttributes.FormatAttributes(this);
        }
Ejemplo n.º 6
0
        private string LookForSiblingIndent(XmlNode currentNode)
        {
            string str2;
            bool   flag            = true;
            string attributeIndent = null;

            using (IEnumerator enumerator = currentNode.ParentNode.ChildNodes.GetEnumerator())
            {
                while (true)
                {
                    if (enumerator.MoveNext())
                    {
                        XmlNode current = (XmlNode)enumerator.Current;
                        if (ReferenceEquals(current, currentNode))
                        {
                            flag = false;
                        }
                        else
                        {
                            IXmlFormattableAttributes attributes = current as IXmlFormattableAttributes;
                            if (attributes != null)
                            {
                                attributeIndent = attributes.AttributeIndent;
                            }
                        }
                        if (flag || (attributeIndent == null))
                        {
                            continue;
                        }
                        str2 = attributeIndent;
                    }
                    else
                    {
                        return(null);
                    }
                    break;
                }
            }
            return(str2);
        }