Exemple #1
0
        public ResultObjectMapping ProcessRow(ResultObjectMapping parent, BufferedTextReader reader, object row)
        {
            var result = new ResultObjectMapping();

            Selects.ForEach(it => result.Add(it.Key, it.Value(row, reader)));
            result.Add(parent);
            return(result);
        }
 public void Add(ResultObjectMapping parent)
 {
     if (parent != null)
     {
         foreach (var kv in parent.ResultObjectsBySource)
         {
             ResultObjectsBySource[kv.Key] = kv.Value;
         }
     }
 }
Exemple #3
0
        public ResultObjectMapping ProcessRow(IDataReader dr, BufferedTextReader reader)
        {
            var result = new ResultObjectMapping();

            foreach (var sel in Query.Selects)
            {
                result.Add(sel.QuerySource, sel.Instancer(result, reader, dr));
            }
            return(result);
        }
Exemple #4
0
        public ResultObjectMapping ProcessRow(ResultObjectMapping parent, BufferedTextReader reader, string[] items)
        {
            var result = new ResultObjectMapping();

            for (int i = 0; i < Selects.Count; i++)
            {
                var sel = Selects[i];
                result.Add(sel.Key, sel.Value(items[i], reader));
            }
            result.Add(parent);
            return(result);
        }