Exemplo n.º 1
0
            public ValueGetter <TValue> GetGetterCore <TValue>(int col, Action checkIsGood)
            {
                bool isSrc;
                int  index = _parent._schema.MapColumnIndex(out isSrc, col);

                if (isSrc)
                {
                    return(_input.GetGetter <TValue>(index));
                }

                var appendedGetter = _appendedRow.GetGetter <TValue>(index);

                return
                    ((ref TValue value) =>
                {
                    checkIsGood?.Invoke();
                    if (_lastServedPosition != _input.Position)
                    {
                        _input.FillValues(_src);
                        // REVIEW: what if this throws? Maybe swallow the exception?
                        _parent._mapAction(_src, _dst);
                        _lastServedPosition = _input.Position;
                    }

                    appendedGetter(ref value);
                });
            }