コード例 #1
0
        static void BeginExecuteSegmentedIsDone(IAsyncResult result)
        {
            CloudTableQuery <Entities.Product> CloudQuery = result.AsyncState as CloudTableQuery <Entities.Product>;
            var resultSegment = CloudQuery.EndExecuteSegmented(result);

            List <Entities.Product> listSongs = resultSegment.Results.ToList <Entities.Product>();

            if (resultSegment.HasMoreResults)
            {
                IAsyncResult iAsyncResult = CloudQuery.BeginExecuteSegmented(resultSegment.ContinuationToken, BeginExecuteSegmentedIsDone, CloudQuery);
            }
        }
コード例 #2
0
ファイル: QueryHelper.cs プロジェクト: zydronium/screwturn-4
        private void ResultAvailable(IAsyncResult asyncResult)
        {
            try {
                var result = _query.EndExecuteSegmented(asyncResult);

                _result.AddRange(result.Results);

                if (result.HasMoreResults)
                {
                    _query.BeginExecuteSegmented(result.ContinuationToken, ResultAvailable, null);
                }
                else
                {
                    _mainWaitHandle.Set();
                }
            }
            catch {
                _mainWaitHandle.Set();
                throw;
            }
        }