File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed
Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change 1+ // public class EnumeratorPlugin<T> : IRandomizerPlugin<T>
2+ // {
3+ // private readonly IEnumerable<T> _enumerable;
4+ // private IEnumerator<T> _enumerator;
5+
6+
7+ // public EnumeratorPlugin(IEnumerable<T> enumerable)
8+ // {
9+ // _enumerable = enumerable;
10+ // }
11+
12+ // public T GetValue()
13+ // {
14+ // // First time?
15+ // if (_enumerator == null)
16+ // {
17+ // _enumerator = _enumerable.GetEnumerator();
18+ // }
19+
20+ // // Advance, try to recover if we hit end-of-enumeration
21+ // var hasNext = _enumerator.MoveNext();
22+ // if (!hasNext)
23+ // {
24+ // _enumerator = _enumerable.GetEnumerator();
25+ // hasNext = _enumerator.MoveNext();
26+
27+ // if (!hasNext)
28+ // {
29+ // throw new Exception("Unable to get next value from enumeration " + _enumerable);
30+ // }
31+ // }
32+
33+ // return _enumerator.Current;
34+ // }
35+ // }
You can’t perform that action at this time.
0 commit comments