Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
TokenInfo.cs
Go to the documentation of this file.
1
namespace
System.Xml.Xsl.Runtime
;
2
3
internal
sealed
class
TokenInfo
4
{
5
public
char
startChar
;
6
7
public
int
startIdx
;
8
9
public
string
formatString
;
10
11
public
int
length
;
12
13
private
TokenInfo
()
14
{
15
}
16
17
public
static
TokenInfo
CreateSeparator
(
string
formatString
,
int
startIdx
,
int
tokLen
)
18
{
19
TokenInfo
tokenInfo
=
new
TokenInfo
();
20
tokenInfo.startIdx
=
startIdx
;
21
tokenInfo.formatString
=
formatString
;
22
tokenInfo.length
=
tokLen
;
23
return
tokenInfo
;
24
}
25
26
public
static
TokenInfo
CreateFormat
(
string
formatString
,
int
startIdx
,
int
tokLen
)
27
{
28
TokenInfo
tokenInfo
=
new
TokenInfo
();
29
tokenInfo.formatString
=
null
;
30
tokenInfo.length
= 1;
31
bool
flag =
false
;
32
char
c =
formatString
[
startIdx
];
33
switch
(c)
34
{
35
default
:
36
if
(
CharUtil
.
IsDecimalDigitOne
(c))
37
{
38
break
;
39
}
40
if
(
CharUtil
.
IsDecimalDigitOne
((
char
)(c + 1)))
41
{
42
int
num =
startIdx
;
43
do
44
{
45
tokenInfo
.length++;
46
}
47
while
(--
tokLen
> 0 && c ==
formatString
[++num]);
48
if
(
formatString
[num] == (c = (
char
)(c + 1)))
49
{
50
break
;
51
}
52
}
53
flag =
true
;
54
break
;
55
case
'1'
:
56
case
'A'
:
57
case
'I'
:
58
case
'a'
:
59
case
'i'
:
60
break
;
61
}
62
if
(
tokLen
!= 1)
63
{
64
flag =
true
;
65
}
66
if
(flag)
67
{
68
tokenInfo.startChar
=
'1'
;
69
tokenInfo.length
= 1;
70
}
71
else
72
{
73
tokenInfo.startChar
= c;
74
}
75
return
tokenInfo
;
76
}
77
}
System.Xml.Xsl.Runtime.CharUtil.IsDecimalDigitOne
static bool IsDecimalDigitOne(char ch)
Definition
CharUtil.cs:21
System.Xml.Xsl.Runtime.CharUtil
Definition
CharUtil.cs:6
System.Xml.Xsl.Runtime.TokenInfo.CreateFormat
static TokenInfo CreateFormat(string formatString, int startIdx, int tokLen)
Definition
TokenInfo.cs:26
System.Xml.Xsl.Runtime.TokenInfo.startIdx
int startIdx
Definition
TokenInfo.cs:7
System.Xml.Xsl.Runtime.TokenInfo.length
int length
Definition
TokenInfo.cs:11
System.Xml.Xsl.Runtime.TokenInfo.startChar
char startChar
Definition
TokenInfo.cs:5
System.Xml.Xsl.Runtime.TokenInfo.TokenInfo
TokenInfo()
Definition
TokenInfo.cs:13
System.Xml.Xsl.Runtime.TokenInfo.CreateSeparator
static TokenInfo CreateSeparator(string formatString, int startIdx, int tokLen)
Definition
TokenInfo.cs:17
System.Xml.Xsl.Runtime.TokenInfo.formatString
string formatString
Definition
TokenInfo.cs:9
System.Xml.Xsl.Runtime.TokenInfo
Definition
TokenInfo.cs:4
System.Xml.Xsl.Runtime
Definition
AncestorDocOrderIterator.cs:4
System.Xml.ValueHandleType.Dictionary
@ Dictionary
source
System.Private.Xml
System.Xml.Xsl.Runtime
TokenInfo.cs
Generated by
1.10.0