예제 #1
0
        /// <summary>
        /// Gets the next chunk from the serie.
        ///
        /// Null if none are available.
        /// </summary>
        /// <returns></returns>
        public async Task <InfluxChunk <TInfluxRow> > GetNextChunkAsync()
        {
            if (await _iterator.ConsumeNextBatchAsync().ConfigureAwait(false))
            {
                return(new InfluxChunk <TInfluxRow>(_iterator.CurrentBatch));
            }

            return(null);
        }
        /// <summary>
        /// Gets the next chunk from the serie.
        ///
        /// Null if none are available.
        /// </summary>
        /// <returns></returns>
        public async Task <InfluxChunk <TInfluxRow> > GetNextChunkAsync(CancellationToken cancellationToken = default)
        {
            if (await _iterator.ConsumeNextBatchAsync(cancellationToken).ConfigureAwait(false))
            {
                return(new InfluxChunk <TInfluxRow>(_iterator.CurrentBatch));
            }

            return(null);
        }