Beispiel #1
0
        /// <summary>
        /// Gets the next result segment.
        /// </summary>
        /// <returns>The next result segment.</returns>
        public ResultSegment <TElement> GetNext()
        {
            CommonUtils.AssertSegmentResultNotComplete <TElement>(this);

            return(TaskImplHelper.ExecuteImplWithRetry <ResultSegment <TElement> >(this.GetNextImpl, this.retryPolicy));
        }
Beispiel #2
0
        /// <summary>
        /// Begins an asynchronous operation to retrieve the next result segment.
        /// </summary>
        /// <param name="callback">The callback delegate that will receive notification when the asynchronous operation completes.</param>
        /// <param name="state">A user-defined object that will be passed to the callback delegate.</param>
        /// <returns>An <see cref="IAsyncResult"/> that references the asynchronous operation.</returns>
        public IAsyncResult BeginGetNext(AsyncCallback callback, object state)
        {
            CommonUtils.AssertSegmentResultNotComplete <TElement>(this);

            return(TaskImplHelper.BeginImplWithRetry <ResultSegment <TElement> >(this.GetNextImpl, this.retryPolicy, callback, state));
        }