Exemplo n.º 1
0
        /// <summary>
        /// Initiates the asynchronous execution to get the next set of results from DynamoDB.
        ///
        /// If there are more items in the Scan/Query, PaginationToken will be
        /// set and can be consumed in a new Scan/Query operation to resume
        /// retrieving items from this point.
        /// </summary>
        /// <param name="cancellationToken">Token which can be used to cancel the task.</param>
        /// <returns>
        /// A Task that can be used to poll or wait for results, or both.
        /// Results will include the next set of result items from DynamoDB.
        /// </returns>
        public async Task <List <T> > GetNextSetAsync(CancellationToken cancellationToken = default(CancellationToken))
        {
            var documents = await DocumentSearch.GetNextSetHelperAsync(cancellationToken).ConfigureAwait(false);

            List <T> items = SourceContext.FromDocumentsHelper <T>(documents, this.Config).ToList();

            return(items);
        }