public Cursor(AppendRowsDataView parent, IEnumerable <Schema.Column> columnsNeeded) : base(parent) { _currentSourceIndex = 0; _currentCursor = Sources[_currentSourceIndex].GetRowCursor(columnsNeeded); _currentIdGetter = _currentCursor.GetIdGetter(); foreach (var col in columnsNeeded) { Getters[col.Index] = CreateGetter(col.Index); } }
public Cursor(AppendRowsDataView parent, Func <int, bool> needCol) : base(parent) { Ch.AssertValue(needCol); _currentSourceIndex = 0; _currentCursor = Sources[_currentSourceIndex].GetRowCursor(needCol); _currentIdGetter = _currentCursor.GetIdGetter(); for (int c = 0; c < Getters.Length; c++) { if (needCol(c)) { Getters[c] = CreateGetter(c); } } }
protected override bool MoveNextCore() { Ch.AssertValue(_currentCursor); while (!_currentCursor.MoveNext()) { // Mark the current cursor as finished. _currentCursor.Dispose(); _currentCursor = null; if (++_currentSourceIndex >= Sources.Length) { return(false); } _currentCursor = Sources[_currentSourceIndex].GetRowCursor(c => IsColumnActive(c)); _currentIdGetter = _currentCursor.GetIdGetter(); } return(true); }