コード例 #1
0
ファイル: Table.cs プロジェクト: jimoneil/Azure-Photo-Mosaics
        public IEnumerable <JobEntry> GetJobsForClient(String clientId, ResultContinuation token = null)
        {
            if (_tableClient.DoesTableExist("jobs"))
            {
                CloudTableQuery <JobEntry> qry =
                    (from j in Context.Jobs
                     where j.PartitionKey == clientId
                     select j).AsTableServiceQuery <JobEntry>();

                // this will return ALL jobs for given client - alternative is to use BeginExecuteSegmented and
                // manage pagination via continuation tokens or filter criteria on client side
                return(qry.Execute());
            }
            else
            {
                return(null);
            }
        }
コード例 #2
0
ファイル: Form1.cs プロジェクト: thinkerrerr/ToBedowned
        // Get a list of all files in the container
        private void GetFileTransferAsync()
        {
            // There are better ways of locking than using a bool, but this is quick and simple for this non-essential scenario and doesn't cause any blocking of the main thread.
            if (boolLoadingFileTransfer)
            {
                return;
            }
            else
            {
                boolLoadingFileTransfer = true;
            }
            pictureFileTransferAnimatedLoading.Visible = true;
            lvFileTransfer.Items.Clear();
            ResultContinuation continuation = null;
            BlobRequestOptions options      = new BlobRequestOptions();

            options.UseFlatBlobListing = true;
            ContainerFileTransfer.BeginListBlobsSegmented(5, continuation, options, new AsyncCallback(ListFileTransferCallback), null);
        }
コード例 #3
0
        public IEnumerable <AzureDiagnosticLogEntry> GetEntriesInRange(string beginPartitionKey, string endPartitionKey, int?entriesLimit)
        {
            var q = (from e in CreateQuery()
                     where e.PartitionKey.CompareTo(beginPartitionKey) >= 0 && e.PartitionKey.CompareTo(endPartitionKey) < 0
                     select e).AsTableServiceQuery();

            if (entriesLimit.HasValue)
            {
                q = q.Take(entriesLimit.Value).AsTableServiceQuery();
            }
            for (ResultContinuation continuation = null; ;)
            {
                var segment = Task.Factory.FromAsync <ResultSegment <EntryType> >(q.BeginExecuteSegmented(continuation, null, null), q.EndExecuteSegmented).Result;
                foreach (var i in segment.Results)
                {
                    yield return(i);
                }
                if (!segment.HasMoreResults)
                {
                    break;
                }
                continuation = segment.ContinuationToken;
            }
        }
コード例 #4
0
 public void SetResultContinuation(ResultContinuation rc)
 {
     _session["resultcontinuation" + this._id] = rc;
 }