Example #1
0
 public void Add(ResultObjectMapping parent)
 {
     if (parent != null)
     {
         foreach (var kv in parent.ResultObjectsBySource)
         {
             ResultObjectsBySource[kv.Key] = kv.Value;
         }
     }
 }
Example #2
0
        public ResultObjectMapping ProcessRow(ResultObjectMapping parent, 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]));
            }
            result.Add(parent);
            return(result);
        }
Example #3
0
        public ResultObjectMapping ProcessRow(IDataReader dr)
        {
            var result = new ResultObjectMapping();

            foreach (var it in Query.Selects)
            {
                if (it.Instancer != null)
                {
                    result.Add(it.QuerySource, it.Instancer(result, dr));
                }
            }
            return(result);
        }