Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
XmlSchemaInfoEqualityComparer.cs
Go to the documentation of this file.
2
3namespace System.Xml.Schema;
4
5internal sealed class XmlSchemaInfoEqualityComparer : IEqualityComparer<XmlSchemaInfo>
6{
8 {
9 if (si1 == si2)
10 {
11 return true;
12 }
13 if (si1 == null || si2 == null)
14 {
15 return false;
16 }
17 if (si1.ContentType == si2.ContentType && si1.IsDefault == si2.IsDefault && si1.IsNil == si2.IsNil && si1.MemberType == si2.MemberType && si1.SchemaAttribute == si2.SchemaAttribute && si1.SchemaElement == si2.SchemaElement && si1.SchemaType == si2.SchemaType)
18 {
19 return si1.Validity == si2.Validity;
20 }
21 return false;
22 }
23
25 {
26 if (si == null)
27 {
28 return 0;
29 }
30 int num = (int)si.ContentType;
31 if (si.IsDefault)
32 {
33 num ^= 1;
34 }
35 if (si.IsNil)
36 {
37 num ^= 1;
38 }
40 if (memberType != null)
41 {
42 num ^= memberType.GetHashCode();
43 }
44 XmlSchemaAttribute schemaAttribute = si.SchemaAttribute;
45 if (schemaAttribute != null)
46 {
47 num ^= schemaAttribute.GetHashCode();
48 }
49 XmlSchemaElement schemaElement = si.SchemaElement;
50 if (schemaElement != null)
51 {
52 num ^= schemaElement.GetHashCode();
53 }
54 XmlSchemaType schemaType = si.SchemaType;
55 if (schemaType != null)
56 {
57 num ^= schemaType.GetHashCode();
58 }
59 return num ^ (int)si.Validity;
60 }
61}
bool Equals(XmlSchemaInfo si1, XmlSchemaInfo si2)