示例#1
0
 public override void Reset()
 {
     base.Reset();
     if (Current == null)
     {
         Helper = null;
     }
 }
示例#2
0
 public void Dispose()
 {
     Reader = null;
     if (Numerator != null)
     {
         Numerator.Dispose();
     }
     Numerator = null;
     helper    = null;
 }
示例#3
0
 public void Reset()
 {
     if (Numerator != null && Numerator.Current != null)
     {
         Numerator.Reset();
         Reader = Numerator.Reader;
     }
     if (Reader != null)
     {
         helper = helper ?? new DbMapperDyn(Reader);
     }
 }
示例#4
0
 public override bool MoveNext()
 {
     if (!base.MoveNext())
     {
         return(false);
     }
     if (Helper == null && ReaderAvailable)
     {
         Helper = new DbMapperDyn(Reader);
     }
     return(true);
 }
示例#5
0
 public bool MoveNext()
 {
     if (Numerator == null || !Numerator.MoveNext())
     {
         return(false);
     }
     if (helper == null)
     {
         Guard.Check(Reader == Numerator.Reader);
         helper = new DbMapperDyn(Numerator.Reader);
     }
     return(helper != null);
 }
示例#6
0
 public override bool NextResult()
 {
     Helper = null;
     if (!base.NextResult())
     {
         return(false);
     }
     if (ReaderAvailable && Current != null)
     {
         Helper = null;
         Helper = new DbMapperDyn(Reader);
     }
     return(ReaderAvailable);
 }
示例#7
0
        public IEnumerable <ExpandoObject> ResultDyn()
        {
            var cycle  = numerator;
            var helper = new DbMapperDyn(reader);

            do
            {
                object[] rec = numerator.Current; // as DbDataRecord;
                if (rec == null)
                {
                    yield break;    // first error
                }
                dynamic obj = helper.Get(rec);
                yield return(obj);
            } while (cycle.MoveNext());
        }