/// <summary> /// Executes a multi-table batch request against all configured batches. /// Results are stored in the respective DocumentBatchGet objects. /// </summary> public void Execute() { MultiBatchGet resultsObject = new MultiBatchGet { Batches = Batches }; var results = resultsObject.GetItems(); foreach (var batch in Batches) { List<Document> batchResults; if (results.TryGetValue(batch.TargetTable.TableName, out batchResults)) { batch.Results = batchResults; } else { batch.Results = new List<Document>(); } } }
/// <summary> /// Executes a server call to batch-get the documents requested. /// Populates Results with the retrieved items. /// </summary> public void Execute() { MultiBatchGet resultsObject = new MultiBatchGet { Batches = new List<DocumentBatchGet> { this } }; var results = resultsObject.GetItems(); Results = results[TargetTable.TableName]; }