public void Build <T>(RowProcessingRequest <T> input)
        {
            IDataReader reader  = input.Reader;
            var         request = new DataReaderRequestData(reader, _aliases);
            var         context = new BindingContext(request, _services, new NulloBindingLogger());

            while (reader.Read())
            {
                T target = input.Finder(reader);
                _binder.Bind(typeof(T), target, context);

                input.Callback(target);
            }
        }
Esempio n. 2
0
        public void Build <T>(RowProcessingRequest <T> input)
        {
            IDataReader reader = input.Reader;

            // TODO -- awkward!  Let's do some convenience methods here and make this easier
            var request = new DataReaderValues(reader, _aliases);
            var context = new BindingContext(new RequestData(new FlatValueSource(request)), _services, new NulloBindingLogger());

            while (reader.Read())
            {
                T target = input.Finder(reader);
                _binder.BindProperties(target, context);

                input.Callback(target);
            }
        }