Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
SafeAsciiDecoder.cs
Go to the documentation of this file.
1
using
System.Text
;
2
3
namespace
System.Xml
;
4
5
internal
sealed
class
SafeAsciiDecoder
:
Decoder
6
{
7
public
override
int
GetCharCount
(
byte
[]
bytes
,
int
index
,
int
count
)
8
{
9
return
count
;
10
}
11
12
public
override
int
GetChars
(
byte
[]
bytes
,
int
byteIndex
,
int
byteCount
,
char
[]
chars
,
int
charIndex
)
13
{
14
int
num =
byteIndex
;
15
int
num2
=
charIndex
;
16
while
(num <
byteIndex
+
byteCount
)
17
{
18
chars
[
num2
++] = (char)
bytes
[num++];
19
}
20
return
byteCount
;
21
}
22
23
public
override
void
Convert
(
byte
[]
bytes
,
int
byteIndex
,
int
byteCount
,
char
[]
chars
,
int
charIndex
,
int
charCount
,
bool
flush
,
out
int
bytesUsed,
out
int
charsUsed,
out
bool
completed
)
24
{
25
if
(
charCount
<
byteCount
)
26
{
27
byteCount
=
charCount
;
28
completed
=
false
;
29
}
30
else
31
{
32
completed
=
true
;
33
}
34
int
num =
byteIndex
;
35
int
num2
=
charIndex
;
36
int
num3
=
byteIndex
+
byteCount
;
37
while
(num <
num3
)
38
{
39
chars
[
num2
++] = (char)
bytes
[num++];
40
}
41
charsUsed =
byteCount
;
42
bytesUsed =
byteCount
;
43
}
44
}
System.Text.Decoder
Definition
Decoder.cs:6
System.Xml.SafeAsciiDecoder.GetCharCount
override int GetCharCount(byte[] bytes, int index, int count)
Definition
SafeAsciiDecoder.cs:7
System.Xml.SafeAsciiDecoder.Convert
override void Convert(byte[] bytes, int byteIndex, int byteCount, char[] chars, int charIndex, int charCount, bool flush, out int bytesUsed, out int charsUsed, out bool completed)
Definition
SafeAsciiDecoder.cs:23
System.Xml.SafeAsciiDecoder.GetChars
override int GetChars(byte[] bytes, int byteIndex, int byteCount, char[] chars, int charIndex)
Definition
SafeAsciiDecoder.cs:12
System.Xml.SafeAsciiDecoder
Definition
SafeAsciiDecoder.cs:6
System.Text
Definition
ConsoleEncoding.cs:1
System.Xml.ValueHandleType.Dictionary
@ Dictionary
System.Xml
Definition
BaseRegionIterator.cs:1
System.ExceptionArgument.bytes
@ bytes
System.ExceptionArgument.byteIndex
@ byteIndex
System.ExceptionArgument.index
@ index
System.ExceptionArgument.charCount
@ charCount
System.ExceptionArgument.byteCount
@ byteCount
System.ExceptionArgument.chars
@ chars
System.ExceptionArgument.charIndex
@ charIndex
System.ExceptionArgument.count
@ count
source
System.Private.Xml
System.Xml
SafeAsciiDecoder.cs
Generated by
1.10.0