Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
OrderedPartition.cs
Go to the documentation of this file.
3
4namespace System.Linq;
5
6internal sealed class OrderedPartition<TElement> : IPartition<TElement>, IIListProvider<TElement>, IEnumerable<TElement>, IEnumerable
7{
9
10 private readonly int _minIndexInclusive;
11
12 private readonly int _maxIndexInclusive;
13
20
25
30
32 {
33 int num = _minIndexInclusive + count;
34 if ((uint)num <= (uint)_maxIndexInclusive)
35 {
37 }
38 return EmptyPartition<TElement>.Instance;
39 }
40
42 {
43 int num = _minIndexInclusive + count - 1;
44 if ((uint)num >= (uint)_maxIndexInclusive)
45 {
46 return this;
47 }
49 }
50
51 public TElement TryGetElementAt(int index, out bool found)
52 {
53 if ((uint)index <= (uint)(_maxIndexInclusive - _minIndexInclusive))
54 {
56 }
57 found = false;
58 return default(TElement);
59 }
60
61 public TElement TryGetFirst(out bool found)
62 {
64 }
65
66 public TElement TryGetLast(out bool found)
67 {
69 }
70
71 public TElement[] ToArray()
72 {
74 }
75
80
85}
int GetCount(bool onlyIfCheap)
IEnumerator< TElement > GetEnumerator()
TElement TryGetElementAt(int index, out bool found)
TElement TryGetLast(out bool found)
readonly OrderedEnumerable< TElement > _source
TElement TryGetElementAt(int index, out bool found)
IPartition< TElement > Skip(int count)
OrderedPartition(OrderedEnumerable< TElement > source, int minIdxInclusive, int maxIdxInclusive)
IEnumerator< TElement > GetEnumerator()
TElement TryGetFirst(out bool found)
int GetCount(bool onlyIfCheap)
TElement TryGetLast(out bool found)
IPartition< TElement > Take(int count)
new IEnumerator< T > GetEnumerator()