Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
TernaryTreeReadOnly.cs
Go to the documentation of this file.
1
namespace
System.Xml
;
2
3
internal
sealed
class
TernaryTreeReadOnly
4
{
5
private
readonly
byte
[]
_nodeBuffer
;
6
7
public
TernaryTreeReadOnly
(
byte
[]
nodeBuffer
)
8
{
9
_nodeBuffer
=
nodeBuffer
;
10
}
11
12
public
byte
FindCaseInsensitiveString
(
string
stringToFind
)
13
{
14
int
num = 0;
15
int
num2
= 0;
16
byte
[]
nodeBuffer
=
_nodeBuffer
;
17
int
num3
=
stringToFind
[num];
18
if
(
num3
> 122)
19
{
20
return
0;
21
}
22
if
(
num3
>= 97)
23
{
24
num3
-= 32;
25
}
26
while
(
true
)
27
{
28
int
num4
=
num2
* 4;
29
int
num5
=
nodeBuffer
[
num4
];
30
if
(
num3
<
num5
)
31
{
32
if
(
nodeBuffer
[
num4
+ 1] == 0)
33
{
34
break
;
35
}
36
num2
+=
nodeBuffer
[
num4
+ 1];
37
continue
;
38
}
39
if
(
num3
>
num5
)
40
{
41
if
(
nodeBuffer
[
num4
+ 2] == 0)
42
{
43
break
;
44
}
45
num2
+=
nodeBuffer
[
num4
+ 2];
46
continue
;
47
}
48
if
(
num3
== 0)
49
{
50
return
nodeBuffer
[
num4
+ 3];
51
}
52
num2
++;
53
num++;
54
if
(num ==
stringToFind
.Length)
55
{
56
num3
= 0;
57
continue
;
58
}
59
num3
=
stringToFind
[num];
60
if
(
num3
> 122)
61
{
62
return
0;
63
}
64
if
(
num3
>= 97)
65
{
66
num3
-= 32;
67
}
68
}
69
return
0;
70
}
71
}
System.Xml.TernaryTreeReadOnly._nodeBuffer
readonly byte[] _nodeBuffer
Definition
TernaryTreeReadOnly.cs:5
System.Xml.TernaryTreeReadOnly.TernaryTreeReadOnly
TernaryTreeReadOnly(byte[] nodeBuffer)
Definition
TernaryTreeReadOnly.cs:7
System.Xml.TernaryTreeReadOnly.FindCaseInsensitiveString
byte FindCaseInsensitiveString(string stringToFind)
Definition
TernaryTreeReadOnly.cs:12
System.Xml.TernaryTreeReadOnly
Definition
TernaryTreeReadOnly.cs:4
System.Xml.ValueHandleType.Dictionary
@ Dictionary
System.Xml
Definition
BaseRegionIterator.cs:1
source
System.Private.Xml
System.Xml
TernaryTreeReadOnly.cs
Generated by
1.10.0