Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
Enumerator.cs
Go to the documentation of this file.
1
using
System.Collections
;
2
using
System.Collections.Generic
;
3
using
System.Diagnostics.CodeAnalysis
;
4
5
namespace
System.Diagnostics
;
6
7
internal
struct
Enumerator
<T> :
IEnumerator
<T>,
IEnumerator
,
IDisposable
8
{
9
private
DiagNode<T>
_nextNode
;
10
11
[
AllowNull
]
12
[
MaybeNull
]
13
private
T
_currentItem
;
14
15
public
T
Current
=>
_currentItem
;
16
17
object
IEnumerator.Current =>
Current
;
18
19
public
Enumerator
(
DiagNode<T>
head)
20
{
21
_nextNode
= head;
22
_currentItem
=
default
(T);
23
}
24
25
public
bool
MoveNext
()
26
{
27
if
(
_nextNode
==
null
)
28
{
29
_currentItem
=
default
(T);
30
return
false
;
31
}
32
_currentItem
=
_nextNode
.Value;
33
_nextNode
=
_nextNode
.Next;
34
return
true
;
35
}
36
37
public
void
Reset
()
38
{
39
throw
new
NotSupportedException
();
40
}
41
42
public
void
Dispose
()
43
{
44
}
45
}
System.Collections.Generic.Dictionary
Definition
Dictionary.cs:14
System.NotSupportedException
Definition
NotSupportedException.cs:9
System.Collections.Generic.IEnumerator
Definition
IEnumerator.cs:4
System.IDisposable
Definition
IDisposable.cs:4
System.Collections.Generic
Definition
IHashKeyCollection.cs:1
System.Collections
Definition
BlockingCollection.cs:8
System.Diagnostics.CodeAnalysis
Definition
AllowNullAttribute.cs:1
System.Diagnostics
Definition
AggregationManager.cs:6
System.Diagnostics.Enumerator.Current
object IEnumerator. Current
Definition
Enumerator.cs:17
System.Diagnostics.Enumerator.Current
T Current
Definition
Enumerator.cs:15
System.Diagnostics.Enumerator._nextNode
DiagNode< T > _nextNode
Definition
Enumerator.cs:9
System.Diagnostics.Enumerator.Reset
void Reset()
Definition
Enumerator.cs:37
System.Diagnostics.Enumerator._currentItem
T _currentItem
Definition
Enumerator.cs:13
System.Diagnostics.Enumerator.Dispose
void Dispose()
Definition
Enumerator.cs:42
System.Diagnostics.Enumerator.Enumerator
Enumerator(DiagNode< T > head)
Definition
Enumerator.cs:19
System.Diagnostics.Enumerator.MoveNext
bool MoveNext()
Definition
Enumerator.cs:25
System.Diagnostics.Enumerator
Definition
Enumerator.cs:8
source
System.Diagnostics.DiagnosticSource
System.Diagnostics
Enumerator.cs
Generated by
1.10.0