1 <?xml version="1.0" encoding="utf-8"?>
2 <Type Name="XNodeEqualityComparer" FullName="System.Xml.Linq.XNodeEqualityComparer">
3 <TypeSignature Language="C#" Value="public sealed class XNodeEqualityComparer : System.Collections.Generic.IEqualityComparer<System.Xml.Linq.XNode>, System.Collections.IEqualityComparer" />
4 <TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit XNodeEqualityComparer extends System.Object implements class System.Collections.Generic.IEqualityComparer`1<class System.Xml.Linq.XNode>, class System.Collections.IEqualityComparer" />
6 <AssemblyName>System.Xml.Linq</AssemblyName>
7 <AssemblyVersion>4.0.0.0</AssemblyVersion>
10 <BaseTypeName>System.Object</BaseTypeName>
14 <InterfaceName>System.Collections.Generic.IEqualityComparer<System.Xml.Linq.XNode></InterfaceName>
17 <InterfaceName>System.Collections.IEqualityComparer</InterfaceName>
22 <attribution license="cc4" from="Microsoft" modified="false" />
23 <para>The purpose of this class is to implement <see cref="T:System.Collections.IEqualityComparer" /> and <see cref="T:System.Collections.Generic.IEqualityComparer`1" />. Classes that require identity (such as <see cref="T:System.Collections.Generic.Dictionary`2" /> ) require an instance of a class that implements one of these interfaces. </para>
26 <attribution license="cc4" from="Microsoft" modified="false" />
27 <para>Compares nodes to determine whether they are equal. This class cannot be inherited. </para>
31 <Member MemberName=".ctor">
32 <MemberSignature Language="C#" Value="public XNodeEqualityComparer ();" />
33 <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
34 <MemberType>Constructor</MemberType>
36 <AssemblyVersion>4.0.0.0</AssemblyVersion>
40 <remarks>To be added.</remarks>
42 <attribution license="cc4" from="Microsoft" modified="false" />
43 <para>Initializes a new instance of the <see cref="T:System.Xml.Linq.XNodeEqualityComparer" /> class. </para>
47 <Member MemberName="Equals">
48 <MemberSignature Language="C#" Value="public bool Equals (System.Xml.Linq.XNode x, System.Xml.Linq.XNode y);" />
49 <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance bool Equals(class System.Xml.Linq.XNode x, class System.Xml.Linq.XNode y) cil managed" />
50 <MemberType>Method</MemberType>
52 <AssemblyVersion>4.0.0.0</AssemblyVersion>
55 <ReturnType>System.Boolean</ReturnType>
58 <Parameter Name="x" Type="System.Xml.Linq.XNode" />
59 <Parameter Name="y" Type="System.Xml.Linq.XNode" />
63 <attribution license="cc4" from="Microsoft" modified="false" />
64 <para>The following criteria determine whether two nodes are equal:</para>
67 <para>A null node is equal to another null node but unequal to a non-null node. </para>
70 <para>Two <see cref="T:System.Xml.Linq.XNode" /> objects of different types are never equal. </para>
73 <para>Two <see cref="T:System.Xml.Linq.XText" /> nodes are equal if they contain the same text. </para>
76 <para>Two <see cref="T:System.Xml.Linq.XElement" /> nodes are equal if they have the same tag name, the same set of attributes with the same values, and (ignoring comments and processing instructions), contain two equal-length sequences of pairwise equal content nodes. </para>
79 <para>Two <see cref="T:System.Xml.Linq.XDocument" /> objects are equal if their root nodes are equal. </para>
82 <para>Two <see cref="T:System.Xml.Linq.XComment" /> nodes are equal if they contain the same comment text. </para>
85 <para>Two <see cref="T:System.Xml.Linq.XProcessingInstruction" /> nodes are equal if they have the same target and data. </para>
88 <para>Two <see cref="T:System.Xml.Linq.XDocumentType" /> nodes are equal if the have the same name, public ID, system ID, and internal subset.</para>
93 <attribution license="cc4" from="Microsoft" modified="false" />
94 <para>Compares the values of two nodes.</para>
97 <attribution license="cc4" from="Microsoft" modified="false" />
98 <para>A <see cref="T:System.Boolean" /> indicating if the nodes are equal.</para>
101 <attribution license="cc4" from="Microsoft" modified="false" />The first <see cref="T:System.Xml.Linq.XNode" /> to compare.</param>
103 <attribution license="cc4" from="Microsoft" modified="false" />The second <see cref="T:System.Xml.Linq.XNode" /> to compare.</param>
106 <Member MemberName="GetHashCode">
107 <MemberSignature Language="C#" Value="public int GetHashCode (System.Xml.Linq.XNode obj);" />
108 <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance int32 GetHashCode(class System.Xml.Linq.XNode obj) cil managed" />
109 <MemberType>Method</MemberType>
111 <AssemblyVersion>4.0.0.0</AssemblyVersion>
114 <ReturnType>System.Int32</ReturnType>
117 <Parameter Name="obj" Type="System.Xml.Linq.XNode" />
121 <attribution license="cc4" from="Microsoft" modified="false" />
122 <para>The <see cref="T:System.Xml.Linq.XNode" /> implementation of <see cref="M:System.Object.GetHashCode" /> is based on the referential identity of the node. This method computes a deep hash code based on the value of the node and all descendants. The hash code reflects all attributes and all descendent nodes.</para>
125 <attribution license="cc4" from="Microsoft" modified="false" />
126 <para>Returns a hash code based on an <see cref="T:System.Xml.Linq.XNode" />.</para>
129 <attribution license="cc4" from="Microsoft" modified="false" />
130 <para>A <see cref="T:System.Int32" /> that contains a value-based hash code for the node.</para>
133 <attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Xml.Linq.XNode" /> to hash.</param>
136 <Member MemberName="System.Collections.IEqualityComparer.Equals">
137 <MemberSignature Language="C#" Value="bool IEqualityComparer.Equals (object n1, object n2);" />
138 <MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance bool System.Collections.IEqualityComparer.Equals(object n1, object n2) cil managed" />
139 <MemberType>Method</MemberType>
141 <AssemblyVersion>4.0.0.0</AssemblyVersion>
144 <ReturnType>System.Boolean</ReturnType>
147 <Parameter Name="n1" Type="System.Object" />
148 <Parameter Name="n2" Type="System.Object" />
151 <param name="n1">To be added.</param>
152 <param name="n2">To be added.</param>
154 <attribution license="cc4" from="Microsoft" modified="false" />
155 <para>The following criteria determine whether two nodes are equal:</para>
158 <para>A null node is equal to another null node but unequal to a non-null node. </para>
161 <para>Two <see cref="T:System.Xml.Linq.XNode" /> objects of different types are never equal. </para>
164 <para>Two <see cref="T:System.Xml.Linq.XText" /> nodes are equal if they contain the same text. </para>
167 <para>Two <see cref="T:System.Xml.Linq.XElement" /> nodes are equal if they have the same tag name, the same set of attributes with the same values, and (ignoring comments and processing instructions), contain two equa-length sequences of pairwise equal content nodes. </para>
170 <para>Two <see cref="T:System.Xml.Linq.XDocument" /> objects are equal if their root nodes are equal. </para>
173 <para>Two <see cref="T:System.Xml.Linq.XComment" /> nodes are equal if they contain the same comment text. </para>
176 <para>Two <see cref="T:System.Xml.Linq.XProcessingInstruction" /> nodes are equal if they have the same target and data. </para>
179 <para>Two <see cref="T:System.Xml.Linq.XDocumentType" /> nodes are equal if the have the same name, public ID, system ID, and internal subset.</para>
184 <attribution license="cc4" from="Microsoft" modified="false" />
185 <para>Compares the values of two nodes.</para>
188 <attribution license="cc4" from="Microsoft" modified="false" />
189 <para>true if the nodes are equal; otherwise false.</para>
193 <Member MemberName="System.Collections.IEqualityComparer.GetHashCode">
194 <MemberSignature Language="C#" Value="int IEqualityComparer.GetHashCode (object obj);" />
195 <MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance int32 System.Collections.IEqualityComparer.GetHashCode(object obj) cil managed" />
196 <MemberType>Method</MemberType>
198 <AssemblyVersion>4.0.0.0</AssemblyVersion>
201 <ReturnType>System.Int32</ReturnType>
204 <Parameter Name="obj" Type="System.Object" />
208 <attribution license="cc4" from="Microsoft" modified="false" />
209 <para>The <see cref="T:System.Xml.Linq.XNode" /> implementation of <see cref="T:System.Object.GetHashCode" /> is based on the referential identity of the node. This method computes a deep hash code based on the value of the node, its attributes, and its descendants.</para>
212 <attribution license="cc4" from="Microsoft" modified="false" />
213 <para>Returns a hash code based on the value of a node.</para>
216 <attribution license="cc4" from="Microsoft" modified="false" />
217 <para>A <see cref="T:System.Int32" /> that contains a value-based hash code for the node.</para>
220 <attribution license="cc4" from="Microsoft" modified="false" />The node to hash.</param>