Ejemplo n.º 1
0
 protected internal override bool fetchNext()
 {
     if (_mainResult.hasNext())
     {
         long mainValue = _mainResult.next();
         if (!_otherResult.hasNext())
         {
             throw new System.InvalidOperationException(format("Legacy query method returned %d, but new query method didn't have more values in it", mainValue));
         }
         long otherValue = _otherResult.next();
         if (mainValue != otherValue)
         {
             throw new System.InvalidOperationException(format("Query methods disagreeing on next value legacy:%d new:%d", mainValue, otherValue));
         }
         return(next(mainValue));
     }
     else if (_otherResult.hasNext())
     {
         throw new System.InvalidOperationException(format("Legacy query method exhausted, but new query method had more %d", _otherResult.next()));
     }
     return(false);
 }