Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
TypeReferenceHandleCollection.cs
Go to the documentation of this file.
1
using
System.Collections
;
2
using
System.Collections.Generic
;
3
4
namespace
System.Reflection.Metadata
;
5
6
public
readonly
struct
TypeReferenceHandleCollection
:
IReadOnlyCollection
<TypeReferenceHandle>,
IEnumerable
<TypeReferenceHandle>,
IEnumerable
7
{
8
public
struct
Enumerator
:
IEnumerator
<TypeReferenceHandle>,
IEnumerator
,
IDisposable
9
{
10
private
readonly
int
_lastRowId
;
11
12
private
int
_currentRowId
;
13
14
public
TypeReferenceHandle
Current
=>
TypeReferenceHandle
.
FromRowId
((
int
)((
long
)
_currentRowId
& 0
xFFFFFFL
));
15
16
object
IEnumerator.Current =>
Current
;
17
18
internal
Enumerator
(
int
lastRowId
)
19
{
20
_lastRowId
=
lastRowId
;
21
_currentRowId
= 0;
22
}
23
24
public
bool
MoveNext
()
25
{
26
if
(
_currentRowId
>=
_lastRowId
)
27
{
28
_currentRowId
= 16777216;
29
return
false
;
30
}
31
_currentRowId
++;
32
return
true
;
33
}
34
35
void
IEnumerator
.
Reset
()
36
{
37
throw
new
NotSupportedException
();
38
}
39
40
void
IDisposable
.
Dispose
()
41
{
42
}
43
}
44
45
private
readonly
int
_lastRowId
;
46
47
public
int
Count
=>
_lastRowId
;
48
49
internal
TypeReferenceHandleCollection
(
int
lastRowId
)
50
{
51
_lastRowId
=
lastRowId
;
52
}
53
54
public
Enumerator
GetEnumerator
()
55
{
56
return
new
Enumerator
(
_lastRowId
);
57
}
58
59
IEnumerator<TypeReferenceHandle>
IEnumerable<TypeReferenceHandle>
.
GetEnumerator
()
60
{
61
return
GetEnumerator
();
62
}
63
64
IEnumerator
IEnumerable
.
GetEnumerator
()
65
{
66
return
GetEnumerator
();
67
}
68
}
System.Collections.Generic.Dictionary.GetEnumerator
Enumerator GetEnumerator()
Definition
Dictionary.cs:984
System.Collections.Generic.Dictionary
Definition
Dictionary.cs:14
System.NotSupportedException
Definition
NotSupportedException.cs:9
System.Collections.Generic.IEnumerable.GetEnumerator
new IEnumerator< T > GetEnumerator()
System.Collections.Generic.IEnumerable
Definition
IEnumerable.cs:4
System.Collections.Generic.IEnumerator
Definition
IEnumerator.cs:4
System.Collections.Generic.IReadOnlyCollection
Definition
IReadOnlyCollection.cs:4
System.Collections.IEnumerator.Reset
void Reset()
System.IDisposable.Dispose
void Dispose()
System.IDisposable
Definition
IDisposable.cs:4
System.Collections.Generic
Definition
IHashKeyCollection.cs:1
System.Collections
Definition
BlockingCollection.cs:8
System.Reflection.Metadata
Definition
AssemblyExtensions.cs:4
System.Reflection.Metadata.TypeReferenceHandleCollection.Enumerator._currentRowId
int _currentRowId
Definition
TypeReferenceHandleCollection.cs:12
System.Reflection.Metadata.TypeReferenceHandleCollection.Enumerator._lastRowId
readonly int _lastRowId
Definition
TypeReferenceHandleCollection.cs:10
System.Reflection.Metadata.TypeReferenceHandleCollection.Enumerator.Enumerator
Enumerator(int lastRowId)
Definition
TypeReferenceHandleCollection.cs:18
System.Reflection.Metadata.TypeReferenceHandleCollection.Enumerator.Current
object IEnumerator. Current
Definition
TypeReferenceHandleCollection.cs:16
System.Reflection.Metadata.TypeReferenceHandleCollection.Enumerator.MoveNext
bool MoveNext()
Definition
TypeReferenceHandleCollection.cs:24
System.Reflection.Metadata.TypeReferenceHandleCollection.Enumerator.Current
TypeReferenceHandle Current
Definition
TypeReferenceHandleCollection.cs:14
System.Reflection.Metadata.TypeReferenceHandleCollection.Enumerator
Definition
TypeReferenceHandleCollection.cs:9
System.Reflection.Metadata.TypeReferenceHandleCollection.TypeReferenceHandleCollection
TypeReferenceHandleCollection(int lastRowId)
Definition
TypeReferenceHandleCollection.cs:49
System.Reflection.Metadata.TypeReferenceHandleCollection.Count
int Count
Definition
TypeReferenceHandleCollection.cs:47
System.Reflection.Metadata.TypeReferenceHandleCollection.GetEnumerator
Enumerator GetEnumerator()
Definition
TypeReferenceHandleCollection.cs:54
System.Reflection.Metadata.TypeReferenceHandleCollection._lastRowId
readonly int _lastRowId
Definition
TypeReferenceHandleCollection.cs:45
System.Reflection.Metadata.TypeReferenceHandleCollection
Definition
TypeReferenceHandleCollection.cs:7
System.Reflection.Metadata.TypeReferenceHandle.FromRowId
static TypeReferenceHandle FromRowId(int rowId)
Definition
TypeReferenceHandle.cs:16
System.Reflection.Metadata.TypeReferenceHandle
Definition
TypeReferenceHandle.cs:4
source
System.Reflection.Metadata
System.Reflection.Metadata
TypeReferenceHandleCollection.cs
Generated by
1.10.0