private void SetViewCells(TModel model, TView view, IndexRange indexRange, System.Array newValues) { IWriteableArray <TViewItem> array = _arrayGetter(view); int[] arrayIndexes = indexRange.GetResetIndex(); int[] newValueIndexes = newValues.GetResetIndex(); while (newValues.MoveIndex(newValueIndexes)) { if (!indexRange.MoveIndex(arrayIndexes)) { throw new InvalidOperationException(); } var newModelItem = (TModelItem)newValues.GetValue(newValueIndexes); SetViewCell(model, view, array, arrayIndexes, newModelItem); } if (indexRange.MoveIndex(arrayIndexes)) { throw new InvalidOperationException(); } }