Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
StructuralComparer.cs
Go to the documentation of this file.
1
using
System.Collections.Generic
;
2
3
namespace
System.Collections
;
4
5
internal
sealed
class
StructuralComparer
:
IComparer
6
{
7
public
int
Compare
(
object
x,
object
y)
8
{
9
if
(x ==
null
)
10
{
11
if
(y !=
null
)
12
{
13
return
-1;
14
}
15
return
0;
16
}
17
if
(y ==
null
)
18
{
19
return
1;
20
}
21
if
(x
is
IStructuralComparable
structuralComparable
)
22
{
23
return
structuralComparable
.CompareTo(y,
this
);
24
}
25
return
Comparer<object>
.Default.Compare(x, y);
26
}
27
}
System.Collections.Generic.Dictionary
Definition
Dictionary.cs:14
System.Collections.StructuralComparer.Compare
int Compare(object x, object y)
Definition
StructuralComparer.cs:7
System.Collections.StructuralComparer
Definition
StructuralComparer.cs:6
System.Collections.IComparer
Definition
IComparer.cs:4
System.Collections.IStructuralComparable
Definition
IStructuralComparable.cs:4
System.Collections.Generic
Definition
IHashKeyCollection.cs:1
System.Collections
Definition
BlockingCollection.cs:8
source
System.Collections
System.Collections
StructuralComparer.cs
Generated by
1.10.0