Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
OrderablePartitioner.cs
Go to the documentation of this file.
2
4
5public abstract class OrderablePartitioner<TSource> : Partitioner<TSource>
6{
7 private sealed class EnumerableDropIndices : IEnumerable<TSource>, IEnumerable, IDisposable
8 {
10
15
20
25
26 public void Dispose()
27 {
29 {
30 disposable.Dispose();
31 }
32 }
33 }
34
35 private sealed class EnumeratorDropIndices : IEnumerator<TSource>, IDisposable, IEnumerator
36 {
38
39 public TSource Current => _source.Current.Value;
40
41 object IEnumerator.Current => Current;
42
47
48 public bool MoveNext()
49 {
50 return _source.MoveNext();
51 }
52
53 public void Dispose()
54 {
55 _source.Dispose();
56 }
57
58 public void Reset()
59 {
60 _source.Reset();
61 }
62 }
63
64 public bool KeysOrderedInEachPartition { get; private set; }
65
66 public bool KeysOrderedAcrossPartitions { get; private set; }
67
68 public bool KeysNormalized { get; private set; }
69
76
78
83
85 {
88 {
89 throw new InvalidOperationException("OrderablePartitioner_GetPartitions_WrongNumberOfPartitions");
90 }
92 for (int i = 0; i < partitionCount; i++)
93 {
95 }
96 return array;
97 }
98
104}
readonly IEnumerable< KeyValuePair< long, TSource > > _source
EnumerableDropIndices(IEnumerable< KeyValuePair< long, TSource > > source)
readonly IEnumerator< KeyValuePair< long, TSource > > _source
EnumeratorDropIndices(IEnumerator< KeyValuePair< long, TSource > > source)
OrderablePartitioner(bool keysOrderedInEachPartition, bool keysOrderedAcrossPartitions, bool keysNormalized)
virtual IEnumerable< KeyValuePair< long, TSource > > GetOrderableDynamicPartitions()
IList< IEnumerator< KeyValuePair< long, TSource > > > GetOrderablePartitions(int partitionCount)
override IEnumerable< TSource > GetDynamicPartitions()
override IList< IEnumerator< TSource > > GetPartitions(int partitionCount)
static string Partitioner_DynamicPartitionsNotSupported
Definition SR.cs:86
Definition SR.cs:7