Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
IncrementalReadCharsDecoder.cs
Go to the documentation of this file.
1
namespace
System.Xml
;
2
3
internal
sealed
class
IncrementalReadCharsDecoder
:
IncrementalReadDecoder
4
{
5
private
char
[]
_buffer
;
6
7
private
int
_startIndex
;
8
9
private
int
_curIndex
;
10
11
private
int
_endIndex
;
12
13
internal
override
int
DecodedCount
=>
_curIndex
-
_startIndex
;
14
15
internal
override
bool
IsFull
=>
_curIndex
==
_endIndex
;
16
17
internal
override
int
Decode
(
char
[]
chars
,
int
startPos
,
int
len
)
18
{
19
int
num =
_endIndex
-
_curIndex
;
20
if
(num >
len
)
21
{
22
num =
len
;
23
}
24
Buffer
.
BlockCopy
(
chars
,
startPos
* 2,
_buffer
,
_curIndex
* 2, num * 2);
25
_curIndex
+= num;
26
return
num;
27
}
28
29
internal
override
int
Decode
(
string
str
,
int
startPos
,
int
len
)
30
{
31
int
num =
_endIndex
-
_curIndex
;
32
if
(num >
len
)
33
{
34
num =
len
;
35
}
36
str
.CopyTo(
startPos
,
_buffer
,
_curIndex
, num);
37
_curIndex
+= num;
38
return
num;
39
}
40
41
internal
override
void
Reset
()
42
{
43
}
44
45
internal
override
void
SetNextOutputBuffer
(
Array
buffer
,
int
index
,
int
count
)
46
{
47
_buffer
= (
char
[])
buffer
;
48
_startIndex
=
index
;
49
_curIndex
=
index
;
50
_endIndex
=
index
+
count
;
51
}
52
}
System.Array
Definition
Array.cs:16
System.Buffer.BlockCopy
static void BlockCopy(Array src, int srcOffset, Array dst, int dstOffset, int count)
Definition
Buffer.cs:102
System.Buffer
Definition
Buffer.cs:8
System.Xml.IncrementalReadCharsDecoder._curIndex
int _curIndex
Definition
IncrementalReadCharsDecoder.cs:9
System.Xml.IncrementalReadCharsDecoder.IsFull
override bool IsFull
Definition
IncrementalReadCharsDecoder.cs:15
System.Xml.IncrementalReadCharsDecoder.Decode
override int Decode(string str, int startPos, int len)
Definition
IncrementalReadCharsDecoder.cs:29
System.Xml.IncrementalReadCharsDecoder.SetNextOutputBuffer
override void SetNextOutputBuffer(Array buffer, int index, int count)
Definition
IncrementalReadCharsDecoder.cs:45
System.Xml.IncrementalReadCharsDecoder._endIndex
int _endIndex
Definition
IncrementalReadCharsDecoder.cs:11
System.Xml.IncrementalReadCharsDecoder.Reset
override void Reset()
Definition
IncrementalReadCharsDecoder.cs:41
System.Xml.IncrementalReadCharsDecoder._startIndex
int _startIndex
Definition
IncrementalReadCharsDecoder.cs:7
System.Xml.IncrementalReadCharsDecoder.DecodedCount
override int DecodedCount
Definition
IncrementalReadCharsDecoder.cs:13
System.Xml.IncrementalReadCharsDecoder.Decode
override int Decode(char[] chars, int startPos, int len)
Definition
IncrementalReadCharsDecoder.cs:17
System.Xml.IncrementalReadCharsDecoder._buffer
char[] _buffer
Definition
IncrementalReadCharsDecoder.cs:5
System.Xml.IncrementalReadCharsDecoder
Definition
IncrementalReadCharsDecoder.cs:4
System.Xml.IncrementalReadDecoder
Definition
IncrementalReadDecoder.cs:4
System.Xml.ValueHandleType.Dictionary
@ Dictionary
System.Xml
Definition
BaseRegionIterator.cs:1
System.ExceptionArgument.str
@ str
System.ExceptionArgument.index
@ index
System.ExceptionArgument.buffer
@ buffer
System.ExceptionArgument.chars
@ chars
System.ExceptionArgument.count
@ count
System.ExceptionArgument.len
@ len
source
System.Private.Xml
System.Xml
IncrementalReadCharsDecoder.cs
Generated by
1.10.0