Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
XmlSchemaInfoEqualityComparer.cs
Go to the documentation of this file.
1
using
System.Collections.Generic
;
2
3
namespace
System.Xml.Schema
;
4
5
internal
sealed
class
XmlSchemaInfoEqualityComparer
:
IEqualityComparer
<XmlSchemaInfo>
6
{
7
public
bool
Equals
(
XmlSchemaInfo
si1
,
XmlSchemaInfo
si2
)
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
24
public
int
GetHashCode
(
XmlSchemaInfo
si
)
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
}
39
XmlSchemaSimpleType
memberType
=
si
.MemberType;
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
}
System.Collections.Generic.Dictionary
Definition
Dictionary.cs:14
System.Xml.Schema.XmlSchemaAttribute
Definition
XmlSchemaAttribute.cs:8
System.Xml.Schema.XmlSchemaElement
Definition
XmlSchemaElement.cs:8
System.Xml.Schema.XmlSchemaInfoEqualityComparer.GetHashCode
int GetHashCode(XmlSchemaInfo si)
Definition
XmlSchemaInfoEqualityComparer.cs:24
System.Xml.Schema.XmlSchemaInfoEqualityComparer.Equals
bool Equals(XmlSchemaInfo si1, XmlSchemaInfo si2)
Definition
XmlSchemaInfoEqualityComparer.cs:7
System.Xml.Schema.XmlSchemaInfoEqualityComparer
Definition
XmlSchemaInfoEqualityComparer.cs:6
System.Xml.Schema.XmlSchemaInfo
Definition
XmlSchemaInfo.cs:4
System.Xml.Schema.XmlSchemaSimpleType
Definition
XmlSchemaSimpleType.cs:6
System.Xml.Schema.XmlSchemaType
Definition
XmlSchemaType.cs:8
System.Collections.Generic.IEqualityComparer
Definition
IEqualityComparer.cs:6
System.Collections.Generic
Definition
IHashKeyCollection.cs:1
System.Xml.Schema
Definition
Extensions.cs:3
System.Xml.ValueHandleType.Dictionary
@ Dictionary
source
System.Private.Xml.Linq
System.Xml.Schema
XmlSchemaInfoEqualityComparer.cs
Generated by
1.10.0