//------------------------------------------------------------------------- /// <summary> /// Checks if this INI file equals another. /// <para> /// The comparison checks the content. /// /// </para> /// </summary> /// <param name="obj"> the other file, null returns false </param> /// <returns> true if equal </returns> public override bool Equals(object obj) { if (obj == this) { return(true); } if (obj is IniFile) { return(sectionMap.Equals(((IniFile)obj).sectionMap)); } return(false); }
//------------------------------------------------------------------------- /// <summary> /// Checks if this file equals another. /// <para> /// The comparison checks the content and reference map. /// /// </para> /// </summary> /// <param name="obj"> the other section, null returns false </param> /// <returns> true if equal </returns> public override bool Equals(object obj) { if (obj == this) { return(true); } if (obj is XmlFile) { XmlFile other = (XmlFile)obj; return(root.Equals(other.root) && refs.Equals(other.refs)); } return(false); }
//------------------------------------------------------------------------- /// <summary> /// Checks if this element equals another. /// <para> /// This compares the entire state of the element, including all children. /// /// </para> /// </summary> /// <param name="obj"> the other element, null returns false </param> /// <returns> true if equal </returns> public override bool Equals(object obj) { if (obj == this) { return(true); } if (obj is XmlElement) { XmlElement other = (XmlElement)obj; return(name.Equals(other.name) && Objects.Equals(content, other.content) && attributes.Equals(other.attributes) && children.Equals(other.children)); } return(false); }