예제 #1
0
        public void AddRecord(MemoryDataRecord record)
        {
            if (record == null)
            {
                throw new ArgumentNullException(nameof(record));
            }
            if (record.IsDisposed)
            {
                throw new ArgumentException("Reader is closed");
            }

            this._records.Add(record);
        }
예제 #2
0
 public void AddToCache(bool hasNext)
 {
     if (hasNext)
     {
         object[]         values = new object[FieldCount];
         MemoryDataRecord record = this._records[0];
         record.GetValues(values);
         block.Add(values);
     }
     else
     {
         SqlUtil.AddBlockToCache(key, new CacheItem(block, false, block.Count, readBytes), con, expiration != null ? (int)expiration.ItemSlidingExpiration.TotalMinutes : 0);
     }
 }