Ejemplo n.º 1
0
        private void readTargetFromLine(FlatFileRequest <T> request, FlatFileValues data, string line, BindingContext context)
        {
            data.ReadLine(line);

            var target = request.Finder(new RequestData(new FlatValueSource(data)));

            _resolver.BindProperties(target, context);

            request.Callback(target);
        }
Ejemplo n.º 2
0
        private void processData(FlatFileRequest <T> request, StreamReader reader, string headers)
        {
            var data = new FlatFileValues(request.Concatenator, headers);

            _aliases.Each((header, alias) => data.Alias(header, alias));

            var context = new BindingContext(new RequestData(new FlatValueSource(data)), _services, new NulloBindingLogger());

            string line;

            while ((line = reader.ReadLine()) != null)
            {
                readTargetFromLine(request, data, line, context);
            }
        }
Ejemplo n.º 3
0
 public void SetUp()
 {
     request = new FlatFileValues("|", "a|b|c|d");
 }