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); }
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); } }