Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
EmptyPartition.cs
Go to the documentation of this file.
5
6namespace System.Linq;
7
8[DebuggerDisplay("Count = 0")]
9internal sealed class EmptyPartition<TElement> : IPartition<TElement>, IIListProvider<TElement>, IEnumerable<TElement>, IEnumerable, IEnumerator<TElement>, IEnumerator, IDisposable
10{
12
13 [ExcludeFromCodeCoverage(Justification = "Shouldn't be called, and as undefined can return or throw anything anyway")]
14 public TElement Current => default(TElement);
15
16 [ExcludeFromCodeCoverage(Justification = "Shouldn't be called, and as undefined can return or throw anything anyway")]
17 object IEnumerator.Current => null;
18
20 {
21 }
22
24 {
25 return this;
26 }
27
29 {
30 return this;
31 }
32
33 public bool MoveNext()
34 {
35 return false;
36 }
37
39 {
40 }
41
43 {
44 }
45
47 {
48 return this;
49 }
50
52 {
53 return this;
54 }
55
56 public TElement TryGetElementAt(int index, out bool found)
57 {
58 found = false;
59 return default(TElement);
60 }
61
62 public TElement TryGetFirst(out bool found)
63 {
64 found = false;
65 return default(TElement);
66 }
67
68 public TElement TryGetLast(out bool found)
69 {
70 found = false;
71 return default(TElement);
72 }
73
74 public TElement[] ToArray()
75 {
76 return Array.Empty<TElement>();
77 }
78
80 {
81 return new List<TElement>();
82 }
83
84 public int GetCount(bool onlyIfCheap)
85 {
86 return 0;
87 }
88}
static readonly IPartition< TElement > Instance
TElement TryGetFirst(out bool found)
IEnumerator< TElement > GetEnumerator()
int GetCount(bool onlyIfCheap)
IPartition< TElement > Skip(int count)
TElement TryGetLast(out bool found)
TElement TryGetElementAt(int index, out bool found)
IPartition< TElement > Take(int count)
List< TElement > ToList()
new IEnumerator< T > GetEnumerator()