/// <summary>
 /// Initiates the asynchronous execution to get all the remaining results from DynamoDB.
 /// </summary>
 /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
 /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
 ///          procedure using the AsyncState property.</param>
 ///
 /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndGetRemaining
 ///         operation.</returns>
 public IAsyncResult BeginGetRemaining(AsyncCallback callback, object state)
 {
     return(DynamoDBAsyncExecutor.BeginOperation(() =>
     {
         var documents = DocumentSearch.GetRemainingHelper(true);
         List <T> items = SourceContext.FromDocumentsHelper <T>(documents, Config).ToList();
         return items;
     }, callback, state));
 }
Exemple #2
0
 /// <summary>
 /// Initiates the asynchronous execution of the Delete operation.
 /// <seealso cref="Amazon.DynamoDBv2.DataModel.DynamoDBContext.Delete"/>
 /// </summary>
 /// <typeparam name="T">Type of object.</typeparam>
 /// <param name="value">Object to delete.</param>
 /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
 /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
 ///          procedure using the AsyncState property.</param>
 /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndDelete
 ///         operation.</returns>
 public IAsyncResult BeginDelete <T>(T value, AsyncCallback callback, object state)
 {
     return(DynamoDBAsyncExecutor.BeginOperation(() => { DeleteHelper <T>(value, null, true); return null; }, callback, state));
 }
Exemple #3
0
 /// <summary>
 /// Initiates the asynchronous execution of the Load operation.
 /// <seealso cref="Amazon.DynamoDBv2.DataModel.DynamoDBContext.Load"/>
 /// </summary>
 /// <typeparam name="T">Type to populate.</typeparam>
 /// <param name="keyObject">Key of the target item.</param>
 /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
 /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
 ///          procedure using the AsyncState property.</param>
 /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndLoad
 ///         operation.</returns>
 public IAsyncResult BeginLoad <T>(T keyObject, AsyncCallback callback, object state)
 {
     return(DynamoDBAsyncExecutor.BeginOperation(() => LoadHelper <T>(keyObject, null, true), callback, state));
 }
 /// <summary>
 /// Initiates the asynchronous execution of the GetNextSet operation.
 /// <seealso cref="Amazon.DynamoDBv2.DocumentModel.Search.GetNextSet"/>
 /// </summary>
 /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
 /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
 ///          procedure using the AsyncState property.</param>
 /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndGetNextSet
 ///         operation.</returns>
 public IAsyncResult BeginGetNextSet(AsyncCallback callback, object state)
 {
     return(DynamoDBAsyncExecutor.BeginOperation(() => GetNextSetHelper(), callback, state));
 }
 /// <summary>
 /// Initiates the asynchronous execution of the Save operation.
 /// <seealso cref="Amazon.DynamoDBv2.DataModel.DynamoDBContext.Save"/>
 /// </summary>
 /// <typeparam name="T">Type to save as.</typeparam>
 /// <param name="value">Object to save.</param>
 /// <param name="operationConfig">Overriding configuration.</param>
 /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
 /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
 ///          procedure using the AsyncState property.</param>
 /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndSave
 ///         operation.</returns>
 public IAsyncResult BeginSave <T>(T value, DynamoDBOperationConfig operationConfig, AsyncCallback callback, object state)
 {
     return(DynamoDBAsyncExecutor.BeginOperation(() => { SaveHelper <T>(value, operationConfig); return null; }, callback, state));
 }
 /// <summary>
 /// Initiates the asynchronous execution of the Delete operation.
 /// <seealso cref="Amazon.DynamoDBv2.DataModel.DynamoDBContext.Delete"/>
 /// </summary>
 /// <typeparam name="T">Type of object.</typeparam>
 /// <param name="hashKey">Hash key element of the object to delete.</param>
 /// <param name="rangeKey">Range key element of the object to delete.</param>
 /// <param name="operationConfig">Config object which can be used to override that table used.</param>
 /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
 /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
 ///          procedure using the AsyncState property.</param>
 /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndDelete
 ///         operation.</returns>
 public IAsyncResult BeginDelete <T>(object hashKey, object rangeKey, DynamoDBOperationConfig operationConfig, AsyncCallback callback, object state)
 {
     return(DynamoDBAsyncExecutor.BeginOperation(() => { DeleteHelper <T>(hashKey, rangeKey, operationConfig); return null; }, callback, state));
 }
 /// <summary>
 /// Initiates the asynchronous execution of the Load operation.
 /// <seealso cref="Amazon.DynamoDBv2.DataModel.DynamoDBContext.Load"/>
 /// </summary>
 /// <typeparam name="T">Type to populate.</typeparam>
 /// <param name="keyObject">Key of the target item.</param>
 /// <param name="operationConfig">Overriding configuration.</param>
 /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
 /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
 ///          procedure using the AsyncState property.</param>
 /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndLoad
 ///         operation.</returns>
 public IAsyncResult BeginLoad <T>(T keyObject, DynamoDBOperationConfig operationConfig, AsyncCallback callback, object state)
 {
     return(DynamoDBAsyncExecutor.BeginOperation(() => LoadHelper <T>(keyObject, operationConfig), callback, state));
 }
Exemple #8
0
 /// <summary>
 /// Initiates the asynchronous execution of the Execute operation.
 /// <seealso cref="Amazon.DynamoDB.DataModel.BatchWrite.Execute"/>
 /// </summary>
 /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
 /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
 ///          procedure using the AsyncState property.</param>
 ///
 /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndExecute
 ///         operation.</returns>
 public IAsyncResult BeginExecute(AsyncCallback callback, object state)
 {
     return(DynamoDBAsyncExecutor.BeginOperation(() => { ExecuteHelper(true); return null; }, callback, state));
 }
Exemple #9
0
 /// <summary>
 /// Initiates the asynchronous execution of the DeleteItem operation.
 /// <seealso cref="Amazon.DynamoDBv2.DocumentModel.Table.DeleteItem"/>
 /// </summary>
 /// <param name="key">Key of the document.</param>
 /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
 /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
 ///          procedure using the AsyncState property.</param>
 /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndDeleteItem
 ///         operation.</returns>
 public IAsyncResult BeginDeleteItem(IDictionary <string, DynamoDBEntry> key, AsyncCallback callback, object state)
 {
     return(DynamoDBAsyncExecutor.BeginOperation(() => { DeleteHelper(MakeKey(key), null, true); return null; }, callback, state));
 }
Exemple #10
0
 /// <summary>
 /// Initiates the asynchronous execution of the DeleteItem operation.
 /// <seealso cref="Amazon.DynamoDBv2.DocumentModel.Table.DeleteItem"/>
 /// </summary>
 /// <param name="hashKey">Hash key element of the document.</param>
 /// <param name="rangeKey">Range key element of the document.</param>
 /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
 /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
 ///          procedure using the AsyncState property.</param>
 /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndDeleteItem
 ///         operation.</returns>
 public IAsyncResult BeginDeleteItem(Primitive hashKey, Primitive rangeKey, AsyncCallback callback, object state)
 {
     return(DynamoDBAsyncExecutor.BeginOperation(() => { DeleteHelper(MakeKey(hashKey, rangeKey), null, true); return null; }, callback, state));
 }
Exemple #11
0
 /// <summary>
 /// Initiates the asynchronous execution of the DeleteItem operation.
 /// <seealso cref="Amazon.DynamoDBv2.DocumentModel.Table.DeleteItem"/>
 /// </summary>
 /// <param name="document">Document to delete.</param>
 /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
 /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
 ///          procedure using the AsyncState property.</param>
 /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndDeleteItem
 ///         operation.</returns>
 public IAsyncResult BeginDeleteItem(Document document, AsyncCallback callback, object state)
 {
     return(DynamoDBAsyncExecutor.BeginOperation(() => { DeleteHelper(MakeKey(document), null, true); return null; }, callback, state));
 }
Exemple #12
0
 /// <summary>
 /// Initiates the asynchronous execution of the UpdateItem operation.
 /// <seealso cref="Amazon.DynamoDBv2.DocumentModel.Table.UpdateItem"/>
 /// </summary>
 /// <param name="doc">Attributes to update.</param>
 /// <param name="hashKey">Hash key element of the document.</param>
 /// <param name="config">Configuration to use.</param>
 /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
 /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
 ///          procedure using the AsyncState property.</param>
 /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndUpdateItem
 ///         operation.</returns>
 public IAsyncResult BeginUpdateItem(Document doc, Primitive hashKey, UpdateItemOperationConfig config, AsyncCallback callback, object state)
 {
     return(DynamoDBAsyncExecutor.BeginOperation(() => UpdateHelper(doc, MakeKey(hashKey, null), config, true), callback, state));
 }
Exemple #13
0
 /// <summary>
 /// Initiates the asynchronous execution of the UpdateItem operation.
 /// <seealso cref="Amazon.DynamoDBv2.DocumentModel.Table.UpdateItem"/>
 /// </summary>
 /// <param name="doc">Attributes to update.</param>
 /// <param name="key">Key of the document.</param>
 /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
 /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
 ///          procedure using the AsyncState property.</param>
 /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndUpdateItem
 ///         operation.</returns>
 public IAsyncResult BeginUpdateItem(Document doc, IDictionary <string, DynamoDBEntry> key, AsyncCallback callback, object state)
 {
     return(DynamoDBAsyncExecutor.BeginOperation(() => UpdateHelper(doc, MakeKey(key), null, true), callback, state));
 }
Exemple #14
0
 /// <summary>
 /// Initiates the asynchronous execution of the UpdateItem operation.
 /// <seealso cref="Amazon.DynamoDBv2.DocumentModel.Table.UpdateItem"/>
 /// </summary>
 /// <param name="doc">Document to update.</param>
 /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
 /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
 ///          procedure using the AsyncState property.</param>
 /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndUpdateItem
 ///         operation.</returns>
 public IAsyncResult BeginUpdateItem(Document doc, AsyncCallback callback, object state)
 {
     return(DynamoDBAsyncExecutor.BeginOperation(() => UpdateHelper(doc, MakeKey(doc), null, true), callback, state));
 }
 /// <summary>
 /// Initiates the asynchronous execution of the GetRemaining operation.
 /// <seealso cref="Amazon.DynamoDBv2.DocumentModel.Search.GetRemaining"/>
 /// </summary>
 /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
 /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
 ///          procedure using the AsyncState property.</param>
 /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndGetRemaining
 ///         operation.</returns>
 public IAsyncResult BeginGetRemaining(AsyncCallback callback, object state)
 {
     return(DynamoDBAsyncExecutor.BeginOperation(() => GetRemainingHelper(true), callback, state));
 }
Exemple #16
0
 /// <summary>
 /// Initiates the asynchronous execution of the DeleteItem operation.
 /// <seealso cref="Amazon.DynamoDBv2.DocumentModel.Table.DeleteItem"/>
 /// </summary>
 /// <param name="document">Document to delete.</param>
 /// <param name="config">Configuration to use.</param>
 /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
 /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
 ///          procedure using the AsyncState property.</param>
 /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndDeleteItem
 ///         operation.</returns>
 public IAsyncResult BeginDeleteItem(Document document, DeleteItemOperationConfig config, AsyncCallback callback, object state)
 {
     return(DynamoDBAsyncExecutor.BeginOperation(() => DeleteHelper(MakeKey(document), config, true), callback, state));
 }
Exemple #17
0
 /// <summary>
 /// Initiates the asynchronous execution of the DeleteItem operation.
 /// <seealso cref="Amazon.DynamoDBv2.DocumentModel.Table.DeleteItem"/>
 /// </summary>
 /// <param name="hashKey">Hash key element of the document.</param>
 /// <param name="rangeKey">Range key element of the document.</param>
 /// <param name="config">Configuration to use.</param>
 /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
 /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
 ///          procedure using the AsyncState property.</param>
 /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndDeleteItem
 ///         operation.</returns>
 public IAsyncResult BeginDeleteItem(Primitive hashKey, Primitive rangeKey, DeleteItemOperationConfig config, AsyncCallback callback, object state)
 {
     return(DynamoDBAsyncExecutor.BeginOperation(() => DeleteHelper(MakeKey(hashKey, rangeKey), config, true), callback, state));
 }
 /// <summary>
 /// Initiates the asynchronous execution of the Load operation.
 /// <seealso cref="Amazon.DynamoDBv2.DataModel.DynamoDBContext.Load"/>
 /// </summary>
 /// <typeparam name="T">Type to populate.</typeparam>
 /// <param name="hashKey">Hash key element of the target item.</param>
 /// <param name="rangeKey">Range key element of the target item.</param>
 /// <param name="operationConfig">Overriding configuration.</param>
 /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
 /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
 ///          procedure using the AsyncState property.</param>
 /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndLoad
 ///         operation.</returns>
 public IAsyncResult BeginLoad <T>(object hashKey, object rangeKey, DynamoDBOperationConfig operationConfig, AsyncCallback callback, object state)
 {
     return(DynamoDBAsyncExecutor.BeginOperation(() => LoadHelper <T>(hashKey, rangeKey, operationConfig), callback, state));
 }
Exemple #19
0
 /// <summary>
 /// Initiates the asynchronous execution of the DeleteItem operation.
 /// <seealso cref="Amazon.DynamoDBv2.DocumentModel.Table.DeleteItem"/>
 /// </summary>
 /// <param name="key">Key of the document.</param>
 /// <param name="config">Configuration to use.</param>
 /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
 /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
 ///          procedure using the AsyncState property.</param>
 /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndDeleteItem
 ///         operation.</returns>
 public IAsyncResult BeginDeleteItem(IDictionary <string, DynamoDBEntry> key, DeleteItemOperationConfig config, AsyncCallback callback, object state)
 {
     return(DynamoDBAsyncExecutor.BeginOperation(() => DeleteHelper(MakeKey(key), config, true), callback, state));
 }
 /// <summary>
 /// Initiates the asynchronous execution of the Delete operation.
 /// <seealso cref="Amazon.DynamoDBv2.DataModel.DynamoDBContext.Delete"/>
 /// </summary>
 /// <typeparam name="T">Type of object.</typeparam>
 /// <param name="hashKey">Hash key element of the object to delete.</param>
 /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
 /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
 ///          procedure using the AsyncState property.</param>
 /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndDelete
 ///         operation.</returns>
 public IAsyncResult BeginDelete <T>(object hashKey, AsyncCallback callback, object state)
 {
     return(DynamoDBAsyncExecutor.BeginOperation(() => { DeleteHelper <T>(hashKey, null, null); return null; }, callback, state));
 }
Exemple #21
0
 /// <summary>
 /// Initiates the asynchronous execution of the PutItem operation.
 /// <seealso cref="Amazon.DynamoDBv2.DocumentModel.Table.PutItem"/>
 /// </summary>
 /// <param name="doc">Document to save.</param>
 /// <param name="config">Configuration to use.</param>
 /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
 /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
 ///          procedure using the AsyncState property.</param>
 /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndPutItem
 ///         operation.</returns>
 public IAsyncResult BeginPutItem(Document doc, PutItemOperationConfig config, AsyncCallback callback, object state)
 {
     return(DynamoDBAsyncExecutor.BeginOperation(() => PutItemHelper(doc, config, true), callback, state));
 }
        /// <summary>
        /// Initiates the asynchronous execution of the ExecuteBatchWrite operation.
        /// <seealso cref="Amazon.DynamoDBv2.DataModel.DynamoDBContext.ExecuteBatchWrite"/>
        /// </summary>
        /// <param name="batches">Configured BatchWrite objects</param>
        /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
        /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
        ///          procedure using the AsyncState property.</param>
        /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndDelete
        ///         operation.</returns>
        public IAsyncResult BeginExecuteBatchWrite(BatchWrite[] batches, AsyncCallback callback, object state)
        {
            MultiTableBatchWrite superBatch = new MultiTableBatchWrite(batches);

            return(DynamoDBAsyncExecutor.BeginOperation(() => { superBatch.ExecuteHelper(); return null; }, callback, state));
        }
Exemple #23
0
 /// <summary>
 /// Initiates the asynchronous execution of the GetItem operation.
 /// <seealso cref="Amazon.DynamoDBv2.DocumentModel.Table.GetItem"/>
 /// </summary>
 /// <param name="hashKey">Hash key element of the document.</param>
 /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
 /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
 ///          procedure using the AsyncState property.</param>
 /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndGetItem
 ///         operation.</returns>
 public IAsyncResult BeginGetItem(Primitive hashKey, AsyncCallback callback, object state)
 {
     return(DynamoDBAsyncExecutor.BeginOperation(() => GetItemHelper(MakeKey(hashKey, null), null, true), callback, state));
 }
 /// <summary>
 /// Initiates the asynchronous execution of the Load operation.
 /// <seealso cref="Amazon.DynamoDBv2.DataModel.DynamoDBContext.Load"/>
 /// </summary>
 /// <typeparam name="T">Type to populate.</typeparam>
 /// <param name="hashKey">Hash key element of the target item.</param>
 /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
 /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
 ///          procedure using the AsyncState property.</param>
 /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndLoad
 ///         operation.</returns>
 public IAsyncResult BeginLoad <T>(object hashKey, AsyncCallback callback, object state)
 {
     return(DynamoDBAsyncExecutor.BeginOperation(() => LoadHelper <T>(hashKey, null, null), callback, state));
 }
Exemple #25
0
 /// <summary>
 /// Initiates the asynchronous execution of the GetItem operation.
 /// <seealso cref="Amazon.DynamoDBv2.DocumentModel.Table.GetItem"/>
 /// </summary>
 /// <param name="key">Key of the document.</param>
 /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
 /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
 ///          procedure using the AsyncState property.</param>
 /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndGetItem
 ///         operation.</returns>
 public IAsyncResult BeginGetItem(IDictionary <string, DynamoDBEntry> key, AsyncCallback callback, object state)
 {
     return(DynamoDBAsyncExecutor.BeginOperation(() => GetItemHelper(MakeKey(key), null), callback, state));
 }