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); }
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); }
private void FormatAttributes(XmlNode node) { IXmlFormattableAttributes formattable = node as IXmlFormattableAttributes; if (formattable != null) { formattable.FormatAttributes(this); } }
private void FormatAttributes(XmlNode node) { IXmlFormattableAttributes attributes = node as IXmlFormattableAttributes; if (attributes != null) { attributes.FormatAttributes(this); } }
private void FormatAttributes(XmlNode node) { IXmlFormattableAttributes formattableAttributes = node as IXmlFormattableAttributes; if (formattableAttributes == null) { return; } formattableAttributes.FormatAttributes(this); }
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); }