public bool MoveNext(out int count) { count = 0; if (_enums.Count != 0) { _current = default; for (int i = 0; i < _enums.Count; i++) { ref HList <RecommendIndexEntry> .Enumerator enumerator = ref _enums.GetByRef(i); if (enumerator.Current > _current) { count = 0; _current = enumerator.Current; } } for (int i = 0; i < _enums.Count; i++) { ref HList <RecommendIndexEntry> .Enumerator enumerator = ref _enums.GetByRef(i); if (enumerator.Current == _current) { count++; if (!enumerator.MoveNext()) { _enums.RemoveAt(i); i--;//Dirty hack to make list work after removal } } }
public bool MoveNext() { var firstPosition = _positions[0]; if (_list[0].Count <= firstPosition) { return(false); } _current = _list[0][firstPosition]; for (int currentListIndex = 0; currentListIndex < _positions.Count; currentListIndex++) { var currentList = _list[currentListIndex]; ref uint currentPosition = ref _positions.GetByRef(currentListIndex); while (_current < currentList[currentPosition]) { currentPosition++; if (currentPosition == currentList.Count) { return(false); } } if (currentList[currentPosition] < _current) { _current = currentList[currentPosition]; currentListIndex = -1;// startOver } }
public bool MoveNext() { if (_enums.Count != 0) { _current = default; for (int i = 0; i < _enums.Count; i++) { ref HList <uint> .Enumerator enumerator = ref _enums.GetByRef(i); if (enumerator.Current > _current) { _current = enumerator.Current; } } for (int i = 0; i < _enums.Count; i++) { ref HList <uint> .Enumerator enumerator = ref _enums.GetByRef(i); if (enumerator.Current == _current && !enumerator.MoveNext()) { _enums.Remove(enumerator); i--;//Dirty hack to make list work after removal } }